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

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

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

origin: org.jboss.web/jbossweb

/**
 * Creates and returns a {@link java.io.File File} representing a uniquely
 * named temporary file in the configured repository path. The lifetime of
 * the file is tied to the lifetime of the <code>FileItem</code> instance;
 * the file will be deleted when the instance is garbage collected.
 *
 * @return The {@link java.io.File File} to be used for temporary storage.
 */
protected File getTempFile() {
  if (tempFile == null) {
    File tempDir = repository;
    if (tempDir == null) {
      tempDir = new File(System.getProperty("java.io.tmpdir"));
    }
    String tempFileName =
      "upload_" + UID + "_" + getUniqueId() + ".tmp";
    tempFile = new File(tempDir, tempFileName);
  }
  return tempFile;
}
origin: codefollower/Tomcat-Research

/**
 * Creates and returns a {@link java.io.File File} representing a uniquely
 * named temporary file in the configured repository path. The lifetime of
 * the file is tied to the lifetime of the <code>FileItem</code> instance;
 * the file will be deleted when the instance is garbage collected.
 *
 * @return The {@link java.io.File File} to be used for temporary storage.
 */
protected File getTempFile() {
  if (tempFile == null) {
    File tempDir = repository;
    if (tempDir == null) {
      tempDir = new File(System.getProperty("java.io.tmpdir"));
    }
    String tempFileName =
        String.format("upload_%s_%s.tmp", UID, getUniqueId());
    tempFile = new File(tempDir, tempFileName);
  }
  return tempFile;
}
origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Creates and returns a {@link java.io.File File} representing a uniquely
 * named temporary file in the configured repository path. The lifetime of
 * the file is tied to the lifetime of the <code>FileItem</code> instance;
 * the file will be deleted when the instance is garbage collected.
 *
 * @return The {@link java.io.File File} to be used for temporary storage.
 */
protected File getTempFile() {
  if (tempFile == null) {
    File tempDir = repository;
    if (tempDir == null) {
      tempDir = new File(System.getProperty("java.io.tmpdir"));
    }
    String tempFileName =
      "upload_" + UID + "_" + getUniqueId() + ".tmp";
    tempFile = new File(tempDir, tempFileName);
  }
  return tempFile;
}
origin: org.apache.coyote/com.springsource.org.apache.coyote

/**
 * Creates and returns a {@link java.io.File File} representing a uniquely
 * named temporary file in the configured repository path. The lifetime of
 * the file is tied to the lifetime of the <code>FileItem</code> instance;
 * the file will be deleted when the instance is garbage collected.
 *
 * @return The {@link java.io.File File} to be used for temporary storage.
 */
protected File getTempFile() {
  if (tempFile == null) {
    File tempDir = repository;
    if (tempDir == null) {
      tempDir = new File(System.getProperty("java.io.tmpdir"));
    }
    String tempFileName =
      "upload_" + UID + "_" + getUniqueId() + ".tmp";
    tempFile = new File(tempDir, tempFileName);
  }
  return tempFile;
}
origin: org.apache.geronimo.ext.tomcat/util

/**
 * Creates and returns a {@link java.io.File File} representing a uniquely
 * named temporary file in the configured repository path. The lifetime of
 * the file is tied to the lifetime of the <code>FileItem</code> instance;
 * the file will be deleted when the instance is garbage collected.
 *
 * @return The {@link java.io.File File} to be used for temporary storage.
 */
protected File getTempFile() {
  if (tempFile == null) {
    File tempDir = repository;
    if (tempDir == null) {
      tempDir = new File(System.getProperty("java.io.tmpdir"));
    }
    String tempFileName =
        String.format("upload_%s_%s.tmp", UID, getUniqueId());
    tempFile = new File(tempDir, tempFileName);
  }
  return tempFile;
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Creates and returns a {@link java.io.File File} representing a uniquely
 * named temporary file in the configured repository path. The lifetime of
 * the file is tied to the lifetime of the <code>FileItem</code> instance;
 * the file will be deleted when the instance is garbage collected.
 * <p>
 * <b>Note: Subclasses that override this method must ensure that they return the
 * same File each time.</b>
 *
 * @return The {@link java.io.File File} to be used for temporary storage.
 */
protected File getTempFile() {
  if (tempFile == null) {
    File tempDir = repository;
    if (tempDir == null) {
      tempDir = new File(System.getProperty("java.io.tmpdir"));
    }
    String tempFileName =
        String.format("upload_%s_%s.tmp", UID, getUniqueId());
    tempFile = new File(tempDir, tempFileName);
  }
  return tempFile;
}
org.apache.tomcat.util.http.fileupload.diskDiskFileItemgetUniqueId

Javadoc

Returns an identifier that is unique within the class loader used to load this class, but does not have random-like apearance.

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

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • IsNull (org.hamcrest.core)
    Is the value null?
  • CodeWhisperer alternatives
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