Tabnine Logo
MultipartEntity.generateBoundary
Code IndexAdd Tabnine to your IDE (free)

How to use
generateBoundary
method
in
org.apache.http.entity.mime.MultipartEntity

Best Java code snippets using org.apache.http.entity.mime.MultipartEntity.generateBoundary (Showing top 1 results out of 315)

origin: org.apache.httpcomponents/com.springsource.org.apache.httpcomponents.httpmime

/**
 * Creates an instance using the specified parameters
 * @param mode the mode to use, may be {@code null}, in which case {@link HttpMultipartMode#STRICT} is used
 * @param boundary the boundary string, may be {@code null}, in which case {@link #generateBoundary()} is invoked to create the string
 * @param charset the character set to use, may be {@code null}, in which case {@link MIME#DEFAULT_CHARSET} - i.e. US-ASCII - is used.
 */
public MultipartEntity(
    HttpMultipartMode mode,
    String boundary,
    Charset charset) {
  super();
  if (boundary == null) {
    boundary = generateBoundary();
  }
  if (mode == null) {
    mode = HttpMultipartMode.STRICT;
  }
  this.multipart = new HttpMultipart("form-data", charset, boundary, mode);
  this.contentType = new BasicHeader(
      HTTP.CONTENT_TYPE,
      generateContentType(boundary, charset));
  this.dirty = true;
}
org.apache.http.entity.mimeMultipartEntitygenerateBoundary

Popular methods of MultipartEntity

  • addPart
  • <init>
    Creates an instance using the specified parameters
  • writeTo
  • getContentType
  • getContentLength
  • isStreaming
  • consumeContent
  • generateContentType
  • getEntity
  • isRepeatable

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JLabel (javax.swing)
  • Best IntelliJ 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