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

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

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

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: codefollower/Tomcat-Research

byte[] fileData = new byte[(int) getSize()];
InputStream fis = null;
origin: org.apache.geronimo.ext.tomcat/util

byte[] fileData = new byte[(int) getSize()];
InputStream fis = null;
origin: org.jboss.web/jbossweb

byte[] fileData = new byte[(int) getSize()];
FileInputStream fis = null;
origin: org.apache.coyote/com.springsource.org.apache.coyote

byte[] fileData = new byte[(int) getSize()];
FileInputStream fis = null;
origin: com.ovea.tajin.server/tajin-server-tomcat7

byte[] fileData = new byte[(int) getSize()];
FileInputStream fis = 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.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.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Returns the contents of the file as an array of bytes.  If the
 * contents of the file were not yet cached in memory, they will be
 * loaded from the disk storage and cached.
 *
 * @return The contents of the file as an array of bytes
 * or {@code null} if the data cannot be read
 */
@Override
public byte[] get() {
  if (isInMemory()) {
    if (cachedContent == null && dfos != null) {
      cachedContent = dfos.getData();
    }
    return cachedContent;
  }
  byte[] fileData = new byte[(int) getSize()];
  InputStream fis = null;
  try {
    fis = new FileInputStream(dfos.getFile());
    IOUtils.readFully(fis, fileData);
  } catch (IOException e) {
    fileData = null;
  } finally {
    IOUtils.closeQuietly(fis);
  }
  return fileData;
}
org.apache.tomcat.util.http.fileupload.diskDiskFileItemgetSize

Javadoc

Returns the size of the file.

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.
  • 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

  • Creating JSON documents from java classes using gson
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • getExternalFilesDir (Context)
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Option (scala)
  • 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