Tabnine Logo
DiskFileItem.getTempFile
Code IndexAdd Tabnine to your IDE (free)

How to use
getTempFile
method
in
org.apache.tomcat.util.http.fileupload.disk.DiskFileItem

Best Java code snippets using org.apache.tomcat.util.http.fileupload.disk.DiskFileItem.getTempFile (Showing top 10 results out of 315)

origin: org.jboss.web/jbossweb

/**
 * Returns an {@link java.io.OutputStream OutputStream} that can
 * be used for storing the contents of the file.
 *
 * @return An {@link java.io.OutputStream OutputStream} that can be used
 *         for storing the contensts of the file.
 *
 * @throws IOException if an error occurs.
 */
public OutputStream getOutputStream()
  throws IOException {
  if (dfos == null) {
    File outputFile = getTempFile();
    dfos = new DeferredFileOutputStream(sizeThreshold, outputFile);
  }
  return dfos;
}
origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Returns an {@link java.io.OutputStream OutputStream} that can
 * be used for storing the contents of the file.
 *
 * @return An {@link java.io.OutputStream OutputStream} that can be used
 *         for storing the contensts of the file.
 *
 * @throws IOException if an error occurs.
 */
public OutputStream getOutputStream()
  throws IOException {
  if (dfos == null) {
    File outputFile = getTempFile();
    dfos = new DeferredFileOutputStream(sizeThreshold, outputFile);
  }
  return dfos;
}
origin: codefollower/Tomcat-Research

/**
 * Returns an {@link java.io.OutputStream OutputStream} that can
 * be used for storing the contents of the file.
 *
 * @return An {@link java.io.OutputStream OutputStream} that can be used
 *         for storing the contensts of the file.
 *
 * @throws IOException if an error occurs.
 */
@Override
public OutputStream getOutputStream()
  throws IOException {
  if (dfos == null) {
    File outputFile = getTempFile();
    dfos = new DeferredFileOutputStream(sizeThreshold, outputFile);
  }
  return dfos;
}
origin: org.apache.geronimo.ext.tomcat/util

/**
 * Returns an {@link java.io.OutputStream OutputStream} that can
 * be used for storing the contents of the file.
 *
 * @return An {@link java.io.OutputStream OutputStream} that can be used
 *         for storing the contensts of the file.
 *
 * @throws IOException if an error occurs.
 */
@Override
public OutputStream getOutputStream()
  throws IOException {
  if (dfos == null) {
    File outputFile = getTempFile();
    dfos = new DeferredFileOutputStream(sizeThreshold, outputFile);
  }
  return dfos;
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Returns an {@link java.io.OutputStream OutputStream} that can
 * be used for storing the contents of the file.
 *
 * @return An {@link java.io.OutputStream OutputStream} that can be used
 *         for storing the contents of the file.
 *
 * @throws IOException if an error occurs.
 */
@Override
public OutputStream getOutputStream()
  throws IOException {
  if (dfos == null) {
    File outputFile = getTempFile();
    dfos = new DeferredFileOutputStream(sizeThreshold, outputFile);
  }
  return dfos;
}
origin: org.apache.coyote/com.springsource.org.apache.coyote

/**
 * Returns an {@link java.io.OutputStream OutputStream} that can
 * be used for storing the contents of the file.
 *
 * @return An {@link java.io.OutputStream OutputStream} that can be used
 *         for storing the contensts of the file.
 *
 * @throws IOException if an error occurs.
 */
@Override
public OutputStream getOutputStream()
  throws IOException {
  if (dfos == null) {
    File outputFile = getTempFile();
    dfos = new DeferredFileOutputStream(sizeThreshold, outputFile);
  }
  return dfos;
}
origin: org.jboss.web/jbossweb

/**
 * Create a new {@link DiskFileItem}
 * instance from the supplied parameters and the local factory
 * configuration.
 *
 * @param fieldName   The name of the form field.
 * @param contentType The content type of the form field.
 * @param isFormField <code>true</code> if this is a plain form field;
 *                    <code>false</code> otherwise.
 * @param fileName    The name of the uploaded file, if any, as supplied
 *                    by the browser or other client.
 *
 * @return The newly created file item.
 */
public FileItem createItem(String fieldName, String contentType,
    boolean isFormField, String fileName) {
  DiskFileItem result = new DiskFileItem(fieldName, contentType,
      isFormField, fileName, sizeThreshold, repository);
  FileCleaningTracker tracker = getFileCleaningTracker();
  if (tracker != null) {
    tracker.track(result.getTempFile(), this);
  }
  return result;
}
origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Create a new {@link DiskFileItem}
 * instance from the supplied parameters and the local factory
 * configuration.
 *
 * @param fieldName   The name of the form field.
 * @param contentType The content type of the form field.
 * @param isFormField <code>true</code> if this is a plain form field;
 *                    <code>false</code> otherwise.
 * @param fileName    The name of the uploaded file, if any, as supplied
 *                    by the browser or other client.
 *
 * @return The newly created file item.
 */
public FileItem createItem(String fieldName, String contentType,
    boolean isFormField, String fileName) {
  DiskFileItem result = new DiskFileItem(fieldName, contentType,
      isFormField, fileName, sizeThreshold, repository);
  FileCleaningTracker tracker = getFileCleaningTracker();
  if (tracker != null) {
    tracker.track(result.getTempFile(), this);
  }
  return result;
}
origin: org.apache.geronimo.ext.tomcat/util

/**
 * Create a new {@link DiskFileItem}
 * instance from the supplied parameters and the local factory
 * configuration.
 *
 * @param fieldName   The name of the form field.
 * @param contentType The content type of the form field.
 * @param isFormField <code>true</code> if this is a plain form field;
 *                    <code>false</code> otherwise.
 * @param fileName    The name of the uploaded file, if any, as supplied
 *                    by the browser or other client.
 *
 * @return The newly created file item.
 */
@Override
public FileItem createItem(String fieldName, String contentType,
    boolean isFormField, String fileName) {
  DiskFileItem result = new DiskFileItem(fieldName, contentType,
      isFormField, fileName, sizeThreshold, repository);
  FileCleaningTracker tracker = getFileCleaningTracker();
  if (tracker != null) {
    tracker.track(result.getTempFile(), result);
  }
  return result;
}
origin: org.apache.coyote/com.springsource.org.apache.coyote

/**
 * Create a new {@link DiskFileItem}
 * instance from the supplied parameters and the local factory
 * configuration.
 *
 * @param fieldName   The name of the form field.
 * @param contentType The content type of the form field.
 * @param isFormField <code>true</code> if this is a plain form field;
 *                    <code>false</code> otherwise.
 * @param fileName    The name of the uploaded file, if any, as supplied
 *                    by the browser or other client.
 *
 * @return The newly created file item.
 */
@Override
public FileItem createItem(String fieldName, String contentType,
    boolean isFormField, String fileName) {
  DiskFileItem result = new DiskFileItem(fieldName, contentType,
      isFormField, fileName, sizeThreshold, repository);
  FileCleaningTracker tracker = getFileCleaningTracker();
  if (tracker != null) {
    tracker.track(result.getTempFile(), this);
  }
  return result;
}
org.apache.tomcat.util.http.fileupload.diskDiskFileItemgetTempFile

Javadoc

Creates and returns a java.io.File representing a uniquely named temporary file in the configured repository path. The lifetime of the file is tied to the lifetime of the FileItem instance; the file will be deleted when the instance is garbage collected.

Popular methods of DiskFileItem

  • getHeaders
    Returns the file item headers.
  • getStoreLocation
    Returns the java.io.File object for the FileItem's data's temporary location on the disk. Note that
  • <init>
    Constructs a new DiskFileItem instance.
  • get
    Returns the contents of the file as an array of bytes. If the contents of the file were not yet cach
  • getCharSet
    Returns the content charset passed by the agent or null if not defined.
  • getContentType
    Returns the content type passed by the agent or null if not defined.
  • getFieldName
    Returns the name of the field in the multipart form corresponding to this file item.
  • getName
    Returns the original filename in the client's filesystem.
  • getSize
    Returns the size of the file.
  • getUniqueId
    Returns an identifier that is unique within the class loader used to load this class, but does not h
  • isFormField
    Determines whether or not a FileItem instance represents a simple form field.
  • isInMemory
    Provides a hint as to whether or not the file contents will be read from memory.
  • isFormField,
  • isInMemory,
  • getOutputStream,
  • getString,
  • setDefaultCharset

Popular in Java

  • Reactive rest calls using spring rest template
  • startActivity (Activity)
  • findViewById (Activity)
  • getSystemService (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • JComboBox (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Join (org.hibernate.mapping)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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