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

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

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

origin: org.jboss.web/jbossweb

/**
 * Deletes the underlying storage for a file item, including deleting any
 * associated temporary disk file. Although this storage will be deleted
 * automatically when the <code>FileItem</code> instance is garbage
 * collected, this method can be used to ensure that this is done at an
 * earlier time, thus preserving system resources.
 */
public void delete() {
  cachedContent = null;
  File outputFile = getStoreLocation();
  if (outputFile != null && outputFile.exists()) {
    outputFile.delete();
  }
}
origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Deletes the underlying storage for a file item, including deleting any
 * associated temporary disk file. Although this storage will be deleted
 * automatically when the <code>FileItem</code> instance is garbage
 * collected, this method can be used to ensure that this is done at an
 * earlier time, thus preserving system resources.
 */
public void delete() {
  cachedContent = null;
  File outputFile = getStoreLocation();
  if (outputFile != null && outputFile.exists()) {
    outputFile.delete();
  }
}
origin: org.apache.geronimo.ext.tomcat/util

/**
 * Deletes the underlying storage for a file item, including deleting any
 * associated temporary disk file. Although this storage will be deleted
 * automatically when the <code>FileItem</code> instance is garbage
 * collected, this method can be used to ensure that this is done at an
 * earlier time, thus preserving system resources.
 */
@Override
public void delete() {
  cachedContent = null;
  File outputFile = getStoreLocation();
  if (outputFile != null && outputFile.exists()) {
    outputFile.delete();
  }
}
origin: codefollower/Tomcat-Research

/**
 * Deletes the underlying storage for a file item, including deleting any
 * associated temporary disk file. Although this storage will be deleted
 * automatically when the <code>FileItem</code> instance is garbage
 * collected, this method can be used to ensure that this is done at an
 * earlier time, thus preserving system resources.
 */
@Override
public void delete() {
  cachedContent = null;
  File outputFile = getStoreLocation();
  if (outputFile != null && outputFile.exists()) {
    outputFile.delete();
  }
}
origin: org.apache.coyote/com.springsource.org.apache.coyote

/**
 * Deletes the underlying storage for a file item, including deleting any
 * associated temporary disk file. Although this storage will be deleted
 * automatically when the <code>FileItem</code> instance is garbage
 * collected, this method can be used to ensure that this is done at an
 * earlier time, thus preserving system resources.
 */
@Override
public void delete() {
  cachedContent = null;
  File outputFile = getStoreLocation();
  if (outputFile != null && outputFile.exists()) {
    outputFile.delete();
  }
}
origin: FastBootWeixin/FastBootWeixin

/**
 * Return a description for the storage location of the multipart content.
 * Tries to be as specific as possible: mentions the file location in case
 * of a temporary file.
 */
public String getStorageDescription() {
  if (this.fileItem.isInMemory()) {
    return "in memory";
  } else if (this.fileItem instanceof DiskFileItem) {
    return "at [" + ((DiskFileItem) this.fileItem).getStoreLocation().getAbsolutePath() + "]";
  } else {
    return "on disk";
  }
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Deletes the underlying storage for a file item, including deleting any
 * associated temporary disk file. Although this storage will be deleted
 * automatically when the <code>FileItem</code> instance is garbage
 * collected, this method can be used to ensure that this is done at an
 * earlier time, thus preserving system resources.
 */
@Override
public void delete() {
  cachedContent = null;
  File outputFile = getStoreLocation();
  if (outputFile != null && !isInMemory() && outputFile.exists()) {
    outputFile.delete();
  }
}
origin: FastBootWeixin/FastBootWeixin

/**
 * Determine whether the multipart content is still available.
 * If a temporary file has been moved, the content is no longer available.
 */
protected boolean isAvailable() {
  // If in memory, it's available.
  if (this.fileItem.isInMemory()) {
    return true;
  }
  // Check actual existence of temporary file.
  if (this.fileItem instanceof DiskFileItem) {
    return ((DiskFileItem) this.fileItem).getStoreLocation().exists();
  }
  // Check whether current file size is different than original one.
  return (this.fileItem.getSize() == this.size);
}
origin: org.apache.geronimo.ext.tomcat/util

/**
 * Returns a string representation of this object.
 *
 * @return a string representation of this object.
 */
@Override
public String toString() {
  return String.format("name=%s, StoreLocation=%s, size=%s bytes, isFormField=%s, FieldName=%s",
         getName(), getStoreLocation(), Long.valueOf(getSize()),
         Boolean.valueOf(isFormField()), getFieldName());
}
origin: codefollower/Tomcat-Research

/**
 * Returns a string representation of this object.
 *
 * @return a string representation of this object.
 */
@Override
public String toString() {
  return String.format("name=%s, StoreLocation=%s, size=%s bytes, isFormField=%s, FieldName=%s",
         getName(), getStoreLocation(), Long.valueOf(getSize()),
         Boolean.valueOf(isFormField()), getFieldName());
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Returns a string representation of this object.
 *
 * @return a string representation of this object.
 */
@Override
public String toString() {
  return String.format("name=%s, StoreLocation=%s, size=%s bytes, isFormField=%s, FieldName=%s",
         getName(), getStoreLocation(), Long.valueOf(getSize()),
         Boolean.valueOf(isFormField()), getFieldName());
}
origin: com.ovea.tajin.server/tajin-server-tomcat7

File outputFile = getStoreLocation();
if (outputFile != null) {
origin: codefollower/Tomcat-Research

File outputFile = getStoreLocation();
if (outputFile != null) {
origin: org.apache.coyote/com.springsource.org.apache.coyote

File outputFile = getStoreLocation();
if (outputFile != null) {
origin: org.jboss.web/jbossweb

/**
 * Returns a string representation of this object.
 *
 * @return a string representation of this object.
 */
@Override
public String toString() {
  return "name=" + this.getName()
    + ", StoreLocation="
    + String.valueOf(this.getStoreLocation())
    + ", size="
    + this.getSize()
    + "bytes, "
    + "isFormField=" + isFormField()
    + ", FieldName="
    + this.getFieldName();
}
origin: org.apache.geronimo.ext.tomcat/util

File outputFile = getStoreLocation();
if (outputFile != null) {
origin: org.jboss.web/jbossweb

File outputFile = getStoreLocation();
if (outputFile != null) {
origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Returns a string representation of this object.
 *
 * @return a string representation of this object.
 */
@Override
public String toString() {
  return "name=" + this.getName()
    + ", StoreLocation="
    + String.valueOf(this.getStoreLocation())
    + ", size="
    + this.getSize()
    + "bytes, "
    + "isFormField=" + isFormField()
    + ", FieldName="
    + this.getFieldName();
}
origin: org.apache.coyote/com.springsource.org.apache.coyote

/**
 * Returns a string representation of this object.
 *
 * @return a string representation of this object.
 */
@Override
public String toString() {
  return "name=" + this.getName()
    + ", StoreLocation="
    + String.valueOf(this.getStoreLocation())
    + ", size="
    + this.getSize()
    + "bytes, "
    + "isFormField=" + isFormField()
    + ", FieldName="
    + this.getFieldName();
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

File outputFile = getStoreLocation();
if (outputFile != null) {
org.apache.tomcat.util.http.fileupload.diskDiskFileItemgetStoreLocation

Javadoc

Returns the java.io.File object for the FileItem's data's temporary location on the disk. Note that for FileItems that have their data stored in memory, this method will return null. When handling large files, you can use java.io.File#renameTo(java.io.File) to move the file to new location without copying the data, if the source and destination locations reside within the same logical volume.

Popular methods of DiskFileItem

  • getHeaders
    Returns the file item headers.
  • <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.
  • getTempFile
    Creates and returns a java.io.File representing a uniquely named temporary file in the configured re
  • 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 Sublime Text 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