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

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

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

origin: commons-httpclient/commons-httpclient

/**
 * Return the full length of all the data.
 * If you override this method make sure to override 
 * #send(OutputStream) as well
 * 
 * @return long The length.
 * @throws IOException If an IO problem occurs
 */
public long length() throws IOException {
  LOG.trace("enter length()");
  if (lengthOfData() < 0) {
    return -1;
  }
  ByteArrayOutputStream overhead = new ByteArrayOutputStream();
  sendStart(overhead);
  sendDispositionHeader(overhead);
  sendContentTypeHeader(overhead);
  sendTransferEncodingHeader(overhead);
  sendEndOfHeader(overhead);
  sendEnd(overhead);
  return overhead.size() + lengthOfData();
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Return the full length of all the data.
 * If you override this method make sure to override 
 * #send(OutputStream) as well
 * 
 * @return long The length.
 * @throws IOException If an IO problem occurs
 */
public long length() throws IOException {
  LOG.trace("enter length()");
  if (lengthOfData() < 0) {
    return -1;
  }
  ByteArrayOutputStream overhead = new ByteArrayOutputStream();
  sendStart(overhead);
  sendDispositionHeader(overhead);
  sendContentTypeHeader(overhead);
  sendTransferEncodingHeader(overhead);
  sendEndOfHeader(overhead);
  sendEnd(overhead);
  return overhead.size() + lengthOfData();
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Return the full length of all the data.
 * If you override this method make sure to override 
 * #send(OutputStream) as well
 * 
 * @return long The length.
 * @throws IOException If an IO problem occurs
 */
public long length() throws IOException {
  LOG.trace("enter length()");
  if (lengthOfData() < 0) {
    return -1;
  }
  ByteArrayOutputStream overhead = new ByteArrayOutputStream();
  sendStart(overhead);
  sendDispositionHeader(overhead);
  sendContentTypeHeader(overhead);
  sendTransferEncodingHeader(overhead);
  sendEndOfHeader(overhead);
  sendEnd(overhead);
  return overhead.size() + lengthOfData();
}
origin: org.apache.commons/httpclient

/**
 * Return the full length of all the data.
 * If you override this method make sure to override 
 * #send(OutputStream) as well
 * 
 * @return long The length.
 * @throws IOException If an IO problem occurs
 */
public long length() throws IOException {
  LOG.trace("enter length()");
  if (lengthOfData() < 0) {
    return -1;
  }
  ByteArrayOutputStream overhead = new ByteArrayOutputStream();
  sendStart(overhead);
  sendDispositionHeader(overhead);
  sendContentTypeHeader(overhead);
  sendTransferEncodingHeader(overhead);
  sendEndOfHeader(overhead);
  sendEnd(overhead);
  return overhead.size() + lengthOfData();
}
origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Return the full length of all the data.
 * If you override this method make sure to override 
 * #send(OutputStream) as well
 * 
 * @return long The length.
 * @throws IOException If an IO problem occurs
 */
public long length() throws IOException {
  LOG.trace("enter length()");
  if (lengthOfData() < 0) {
    return -1;
  }
  ByteArrayOutputStream overhead = new ByteArrayOutputStream();
  sendStart(overhead);
  sendDispositionHeader(overhead);
  sendContentTypeHeader(overhead);
  sendTransferEncodingHeader(overhead);
  sendEndOfHeader(overhead);
  sendEnd(overhead);
  return overhead.size() + lengthOfData();
}
org.apache.commons.httpclient.methods.multipartPartlengthOfData

Javadoc

Return the length of the main content

Popular methods of Part

  • getBoundary
    Return the boundary string.
  • 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
  • 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

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Path (java.nio.file)
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • From CI to AI: The AI layer in your organization
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