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

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

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

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

/**
 * 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.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.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.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);
  }
}
org.apache.tomcat.util.http.fileupload.diskDiskFileItemgetCharSet

Javadoc

Returns the content charset passed by the agent or null if not defined.

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

  • Start an intent from android
  • setContentView (Activity)
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • 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