Tabnine Logo
Part.getBoundary
Code IndexAdd Tabnine to your IDE (free)

How to use
getBoundary
method
in
org.apache.commons.httpclient.methods.multipart.Part

Best Java code snippets using org.apache.commons.httpclient.methods.multipart.Part.getBoundary (Showing top 5 results out of 315)

origin: commons-httpclient/commons-httpclient

/**
 * Adds a <tt>Content-Type</tt> request header.
 *
 * @param state current state of http requests
 * @param conn the connection to use for I/O
 *
 * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
 *                     can be recovered from.
 * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions 
 *                    cannot be recovered from.
 * 
 * @since 3.0
 */
protected void addContentTypeRequestHeader(HttpState state,
                       HttpConnection conn)
throws IOException, HttpException {
  LOG.trace("enter EntityEnclosingMethod.addContentTypeRequestHeader("
       + "HttpState, HttpConnection)");
  if (!parameters.isEmpty()) {
    StringBuffer buffer = new StringBuffer(MULTIPART_FORM_CONTENT_TYPE);
    if (Part.getBoundary() != null) {
      buffer.append("; boundary=");
      buffer.append(Part.getBoundary());
    }
    setRequestHeader("Content-Type", buffer.toString());
  }
}
origin: org.apache.commons/httpclient

/**
 * Adds a <tt>Content-Type</tt> request header.
 *
 * @param state current state of http requests
 * @param conn the connection to use for I/O
 *
 * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
 *                     can be recovered from.
 * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions 
 *                    cannot be recovered from.
 * 
 * @since 3.0
 */
protected void addContentTypeRequestHeader(HttpState state,
                       HttpConnection conn)
throws IOException, HttpException {
  LOG.trace("enter EntityEnclosingMethod.addContentTypeRequestHeader("
       + "HttpState, HttpConnection)");
  if (!parameters.isEmpty()) {
    StringBuffer buffer = new StringBuffer(MULTIPART_FORM_CONTENT_TYPE);
    if (Part.getBoundary() != null) {
      buffer.append("; boundary=");
      buffer.append(Part.getBoundary());
    }
    setRequestHeader("Content-Type", buffer.toString());
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Adds a <tt>Content-Type</tt> request header.
 *
 * @param state current state of http requests
 * @param conn the connection to use for I/O
 *
 * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
 *                     can be recovered from.
 * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions 
 *                    cannot be recovered from.
 * 
 * @since 3.0
 */
protected void addContentTypeRequestHeader(HttpState state,
                       HttpConnection conn)
throws IOException, HttpException {
  LOG.trace("enter EntityEnclosingMethod.addContentTypeRequestHeader("
       + "HttpState, HttpConnection)");
  if (!parameters.isEmpty()) {
    StringBuffer buffer = new StringBuffer(MULTIPART_FORM_CONTENT_TYPE);
    if (Part.getBoundary() != null) {
      buffer.append("; boundary=");
      buffer.append(Part.getBoundary());
    }
    setRequestHeader("Content-Type", buffer.toString());
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Adds a <tt>Content-Type</tt> request header.
 *
 * @param state current state of http requests
 * @param conn the connection to use for I/O
 *
 * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
 *                     can be recovered from.
 * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions 
 *                    cannot be recovered from.
 * 
 * @since 3.0
 */
protected void addContentTypeRequestHeader(HttpState state,
                       HttpConnection conn)
throws IOException, HttpException {
  LOG.trace("enter EntityEnclosingMethod.addContentTypeRequestHeader("
       + "HttpState, HttpConnection)");
  if (!parameters.isEmpty()) {
    StringBuffer buffer = new StringBuffer(MULTIPART_FORM_CONTENT_TYPE);
    if (Part.getBoundary() != null) {
      buffer.append("; boundary=");
      buffer.append(Part.getBoundary());
    }
    setRequestHeader("Content-Type", buffer.toString());
  }
}
origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Adds a <tt>Content-Type</tt> request header.
 *
 * @param state current state of http requests
 * @param conn the connection to use for I/O
 *
 * @throws IOException if an I/O (transport) error occurs. Some transport exceptions
 *                     can be recovered from.
 * @throws HttpException  if a protocol exception occurs. Usually protocol exceptions 
 *                    cannot be recovered from.
 * 
 * @since 3.0
 */
protected void addContentTypeRequestHeader(HttpState state,
                       HttpConnection conn)
throws IOException, HttpException {
  LOG.trace("enter EntityEnclosingMethod.addContentTypeRequestHeader("
       + "HttpState, HttpConnection)");
  if (!parameters.isEmpty()) {
    StringBuffer buffer = new StringBuffer(MULTIPART_FORM_CONTENT_TYPE);
    if (Part.getBoundary() != null) {
      buffer.append("; boundary=");
      buffer.append(Part.getBoundary());
    }
    setRequestHeader("Content-Type", buffer.toString());
  }
}
org.apache.commons.httpclient.methods.multipartPartgetBoundary

Javadoc

Return the boundary string.

Popular methods of Part

  • getCharSet
    Return the character encoding of this part.
  • getContentType
    Returns the content type of this part.
  • getLengthOfParts
    Gets the length of the multipart message including the given parts.
  • getName
    Return the name of this part.
  • getPartBoundary
    Gets the part boundary to be used.
  • getTransferEncoding
    Return the transfer encoding of this part.
  • isRepeatable
    Tests if this part can be sent more than once.
  • length
    Return the full length of all the data. If you override this method make sure to override #send(Outp
  • lengthOfData
    Return the length of the main content
  • send
    Write all the data to the output stream. If you override this method make sure to override #length()
  • sendContentTypeHeader
    Write the content type header to the specified output stream
  • sendData
    Write the data to the specified output stream
  • sendContentTypeHeader,
  • sendData,
  • sendDispositionHeader,
  • sendEnd,
  • sendEndOfHeader,
  • sendParts,
  • sendStart,
  • sendTransferEncodingHeader,
  • setPartBoundary

Popular in Java

  • Making http requests using okhttp
  • getContentResolver (Context)
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Path (java.nio.file)
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • 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