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

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

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

origin: org.apache.coyote/com.springsource.org.apache.coyote

/**
 * Returns the contents of the file as a String, using the specified
 * encoding.  This method uses {@link #get()} to retrieve the
 * contents of the file.
 *
 * @param charset The charset to use.
 *
 * @return The contents of the file, as a string.
 *
 * @throws UnsupportedEncodingException if the requested character
 *                                      encoding is not available.
 */
@Override
public String getString(final String charset)
  throws UnsupportedEncodingException {
  return new String(get(), charset);
}
origin: org.apache.coyote/com.springsource.org.apache.coyote

/**
 * Returns the contents of the file as a String, using the default
 * character encoding.  This method uses {@link #get()} to retrieve the
 * contents of the file.
 *
 * @return The contents of the file, as a string.
 *
 * TODO Consider making this method throw UnsupportedEncodingException.
 */
@Override
public String getString() {
  byte[] rawdata = get();
  String charset = getCharSet();
  if (charset == null) {
    charset = DEFAULT_CHARSET;
  }
  try {
    return new String(rawdata, charset);
  } catch (UnsupportedEncodingException e) {
    return new String(rawdata);
  }
}
origin: com.ovea.tajin.server/tajin-server-tomcat7

try {
  fout = new FileOutputStream(file);
  fout.write(get());
} finally {
  if (fout != null) {
origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Returns the contents of the file as a String, using the default
 * character encoding.  This method uses {@link #get()} to retrieve the
 * contents of the file.
 *
 * @return The contents of the file, as a string.
 *
 * TODO Consider making this method throw UnsupportedEncodingException.
 */
public String getString() {
  byte[] rawdata = get();
  String charset = getCharSet();
  if (charset == null) {
    charset = DEFAULT_CHARSET;
  }
  try {
    return new String(rawdata, charset);
  } catch (UnsupportedEncodingException e) {
    return new String(rawdata);
  }
}
origin: codefollower/Tomcat-Research

try {
  fout = new FileOutputStream(file);
  fout.write(get());
} finally {
  if (fout != null) {
origin: org.jboss.web/jbossweb

/**
 * Returns the contents of the file as a String, using the specified
 * encoding.  This method uses {@link #get()} to retrieve the
 * contents of the file.
 *
 * @param charset The charset to use.
 *
 * @return The contents of the file, as a string.
 *
 * @throws UnsupportedEncodingException if the requested character
 *                                      encoding is not available.
 */
public String getString(final String charset)
  throws UnsupportedEncodingException {
  return new String(get(), charset);
}
origin: org.jboss.web/jbossweb

/**
 * Returns the contents of the file as a String, using the default
 * character encoding.  This method uses {@link #get()} to retrieve the
 * contents of the file.
 *
 * @return The contents of the file, as a string.
 *
 * TODO Consider making this method throw UnsupportedEncodingException.
 */
public String getString() {
  byte[] rawdata = get();
  String charset = getCharSet();
  if (charset == null) {
    charset = DEFAULT_CHARSET;
  }
  try {
    return new String(rawdata, charset);
  } catch (UnsupportedEncodingException e) {
    return new String(rawdata);
  }
}
origin: org.apache.coyote/com.springsource.org.apache.coyote

try {
  fout = new FileOutputStream(file);
  fout.write(get());
} finally {
  if (fout != null) {
origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Returns the contents of the file as a String, using the specified
 * encoding.  This method uses {@link #get()} to retrieve the
 * contents of the file.
 *
 * @param charset The charset to use.
 *
 * @return The contents of the file, as a string.
 *
 * @throws UnsupportedEncodingException if the requested character
 *                                      encoding is not available.
 */
public String getString(final String charset)
  throws UnsupportedEncodingException {
  return new String(get(), charset);
}
origin: org.apache.geronimo.ext.tomcat/util

/**
 * Returns the contents of the file as a String, using the default
 * character encoding.  This method uses {@link #get()} to retrieve the
 * contents of the file.
 *
 * <b>TODO</b> Consider making this method throw UnsupportedEncodingException.
 *
 * @return The contents of the file, as a string.
 */
@Override
public String getString() {
  byte[] rawdata = get();
  String charset = getCharSet();
  if (charset == null) {
    charset = DEFAULT_CHARSET;
  }
  try {
    return new String(rawdata, charset);
  } catch (UnsupportedEncodingException e) {
    return new String(rawdata);
  }
}
origin: org.jboss.web/jbossweb

try {
  fout = new FileOutputStream(file);
  fout.write(get());
} finally {
  if (fout != null) {
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Returns the contents of the file as a String, using the specified
 * encoding.  This method uses {@link #get()} to retrieve the
 * contents of the file.
 *
 * @param charset The charset to use.
 *
 * @return The contents of the file, as a string.
 *
 * @throws UnsupportedEncodingException if the requested character
 *                                      encoding is not available.
 */
@Override
public String getString(final String charset)
  throws UnsupportedEncodingException {
  return new String(get(), charset);
}
origin: codefollower/Tomcat-Research

/**
 * Returns the contents of the file as a String, using the default
 * character encoding.  This method uses {@link #get()} to retrieve the
 * contents of the file.
 *
 * <b>TODO</b> Consider making this method throw UnsupportedEncodingException.
 *
 * @return The contents of the file, as a string.
 */
@Override
public String getString() {
  byte[] rawdata = get();
  String charset = getCharSet();
  if (charset == null) {
    charset = DEFAULT_CHARSET;
  }
  try {
    return new String(rawdata, charset);
  } catch (UnsupportedEncodingException e) {
    return new String(rawdata);
  }
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

try {
  fout = new FileOutputStream(file);
  fout.write(get());
  fout.close();
} finally {
origin: codefollower/Tomcat-Research

/**
 * Returns the contents of the file as a String, using the specified
 * encoding.  This method uses {@link #get()} to retrieve the
 * contents of the file.
 *
 * @param charset The charset to use.
 *
 * @return The contents of the file, as a string.
 *
 * @throws UnsupportedEncodingException if the requested character
 *                                      encoding is not available.
 */
@Override
public String getString(final String charset)
  throws UnsupportedEncodingException {
  return new String(get(), charset);
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Returns the contents of the file as a String, using the default
 * character encoding.  This method uses {@link #get()} to retrieve the
 * contents of the file.
 *
 * <b>TODO</b> Consider making this method throw UnsupportedEncodingException.
 *
 * @return The contents of the file, as a string.
 */
@Override
public String getString() {
  byte[] rawdata = get();
  String charset = getCharSet();
  if (charset == null) {
    charset = defaultCharset;
  }
  try {
    return new String(rawdata, charset);
  } catch (UnsupportedEncodingException e) {
    return new String(rawdata);
  }
}
origin: org.apache.geronimo.ext.tomcat/util

/**
 * Returns the contents of the file as a String, using the specified
 * encoding.  This method uses {@link #get()} to retrieve the
 * contents of the file.
 *
 * @param charset The charset to use.
 *
 * @return The contents of the file, as a string.
 *
 * @throws UnsupportedEncodingException if the requested character
 *                                      encoding is not available.
 */
@Override
public String getString(final String charset)
  throws UnsupportedEncodingException {
  return new String(get(), charset);
}
origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Writes the state of this object during serialization.
 *
 * @param out The stream to which the state should be written.
 *
 * @throws IOException if an error occurs.
 */
private void writeObject(ObjectOutputStream out) throws IOException {
  // Read the data
  if (dfos.isInMemory()) {
    cachedContent = get();
  } else {
    cachedContent = null;
    dfosFile = dfos.getFile();
  }
  // write out values
  out.defaultWriteObject();
}
origin: org.apache.geronimo.ext.tomcat/util

/**
 * Writes the state of this object during serialization.
 *
 * @param out The stream to which the state should be written.
 *
 * @throws IOException if an error occurs.
 */
private void writeObject(ObjectOutputStream out) throws IOException {
  // Read the data
  if (dfos.isInMemory()) {
    cachedContent = get();
  } else {
    cachedContent = null;
    dfosFile = dfos.getFile();
  }
  // write out values
  out.defaultWriteObject();
}
origin: org.apache.coyote/com.springsource.org.apache.coyote

/**
 * Writes the state of this object during serialization.
 *
 * @param out The stream to which the state should be written.
 *
 * @throws IOException if an error occurs.
 */
private void writeObject(ObjectOutputStream out) throws IOException {
  // Read the data
  if (dfos.isInMemory()) {
    cachedContent = get();
  } else {
    cachedContent = null;
    dfosFile = dfos.getFile();
  }
  // write out values
  out.defaultWriteObject();
}
org.apache.tomcat.util.http.fileupload.diskDiskFileItemget

Javadoc

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.

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

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getContentResolver (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Collectors (java.util.stream)
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Best plugins for Eclipse
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