congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
Uploadable.openInputStream
Code IndexAdd Tabnine to your IDE (free)

How to use
openInputStream
method
in
jodd.http.up.Uploadable

Best Java code snippets using jodd.http.up.Uploadable.openInputStream (Showing top 6 results out of 315)

origin: oblac/jodd

/**
 * Writes content to the writer.
 */
public void writeTo(final Writer writer) throws IOException {
  for (Object o : list) {
    if (o instanceof FastByteBuffer) {
      FastByteBuffer fastByteBuffer = (FastByteBuffer) o;
      byte[] array = fastByteBuffer.toArray();
      writer.write(new String(array, StringPool.ISO_8859_1));
    }
    else if (o instanceof Uploadable) {
      Uploadable uploadable = (Uploadable) o;
      InputStream inputStream = uploadable.openInputStream();
      try {
        StreamUtil.copy(inputStream, writer, StringPool.ISO_8859_1);
      }
      finally {
        StreamUtil.close(inputStream);
      }
    }
  }
}
origin: oblac/jodd

/**
 * Writes content to the output stream.
 */
public void writeTo(final OutputStream out) throws IOException {
  for (Object o : list) {
    if (o instanceof FastByteBuffer) {
      FastByteBuffer fastByteBuffer = (FastByteBuffer) o;
      out.write(fastByteBuffer.toArray());
    }
    else if (o instanceof Uploadable) {
      Uploadable uploadable = (Uploadable) o;
      InputStream inputStream = uploadable.openInputStream();
      try {
        StreamUtil.copy(inputStream, out);
      }
      finally {
        StreamUtil.close(inputStream);
      }
    }
  }
}
origin: oblac/jodd

Uploadable uploadable = (Uploadable) o;
InputStream inputStream = uploadable.openInputStream();
origin: org.jodd/jodd-http

/**
 * Writes content to the writer.
 */
public void writeTo(final Writer writer) throws IOException {
  for (Object o : list) {
    if (o instanceof FastByteBuffer) {
      FastByteBuffer fastByteBuffer = (FastByteBuffer) o;
      byte[] array = fastByteBuffer.toArray();
      writer.write(new String(array, StringPool.ISO_8859_1));
    }
    else if (o instanceof Uploadable) {
      Uploadable uploadable = (Uploadable) o;
      InputStream inputStream = uploadable.openInputStream();
      try {
        StreamUtil.copy(inputStream, writer, StringPool.ISO_8859_1);
      }
      finally {
        StreamUtil.close(inputStream);
      }
    }
  }
}
origin: org.jodd/jodd-http

/**
 * Writes content to the output stream.
 */
public void writeTo(final OutputStream out) throws IOException {
  for (Object o : list) {
    if (o instanceof FastByteBuffer) {
      FastByteBuffer fastByteBuffer = (FastByteBuffer) o;
      out.write(fastByteBuffer.toArray());
    }
    else if (o instanceof Uploadable) {
      Uploadable uploadable = (Uploadable) o;
      InputStream inputStream = uploadable.openInputStream();
      try {
        StreamUtil.copy(inputStream, out);
      }
      finally {
        StreamUtil.close(inputStream);
      }
    }
  }
}
origin: org.jodd/jodd-http

Uploadable uploadable = (Uploadable) o;
InputStream inputStream = uploadable.openInputStream();
jodd.http.upUploadableopenInputStream

Javadoc

Opens InputStream. User is responsible for closing it.

Popular methods of Uploadable

  • getFileName
    Returns content file name. If null, the field's name will be used.
  • getMimeType
    Returns MIME type. If null, MIME type will be determined from #getFileName() extension.
  • getSize
    Returns size in bytes.

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now