Java Doc for Part.java in  » Net » Apache-common-HttpClient » org » apache » commons » httpclient » methods » multipart » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » Apache common HttpClient » org.apache.commons.httpclient.methods.multipart 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.httpclient.methods.multipart.Part

All known Subclasses:   org.apache.commons.httpclient.methods.multipart.PartBase,
Part
abstract public class Part (Code)
Abstract class for one Part of a multipart post object.
author:
   Matthew Albright
author:
   Jeff Dever
author:
   Adrian Sutton
author:
   Mike Bowler
author:
   Oleg Kalnichevski
since:
   2.0


Field Summary
final protected static  StringBOUNDARY
    
final protected static  byte[]BOUNDARY_BYTES
     The boundary as a byte array.
final protected static  StringCHARSET
    
final protected static  byte[]CHARSET_BYTES
    
final protected static  StringCONTENT_DISPOSITION
    
final protected static  byte[]CONTENT_DISPOSITION_BYTES
    
final protected static  StringCONTENT_TRANSFER_ENCODING
    
final protected static  byte[]CONTENT_TRANSFER_ENCODING_BYTES
    
final protected static  StringCONTENT_TYPE
    
final protected static  byte[]CONTENT_TYPE_BYTES
    
final protected static  StringCRLF
    
final protected static  byte[]CRLF_BYTES
    
final protected static  StringEXTRA
    
final protected static  byte[]EXTRA_BYTES
    
final protected static  StringQUOTE
    
final protected static  byte[]QUOTE_BYTES
    


Method Summary
public static  StringgetBoundary()
     Return the boundary string.
abstract public  StringgetCharSet()
     Return the character encoding of this part.
abstract public  StringgetContentType()
     Returns the content type of this part.
public static  longgetLengthOfParts(Part[] parts)
     Return the total sum of all parts and that of the last boundary
Parameters:
  parts - The parts.
public static  longgetLengthOfParts(Part[] parts, byte[] partBoundary)
     Gets the length of the multipart message including the given parts.
Parameters:
  parts - The parts.
Parameters:
  partBoundary - The ASCII bytes to use as the part boundary.
abstract public  StringgetName()
     Return the name of this part.
protected  byte[]getPartBoundary()
     Gets the part boundary to be used.
abstract public  StringgetTransferEncoding()
     Return the transfer encoding of this part.
public  booleanisRepeatable()
     Tests if this part can be sent more than once.
public  longlength()
     Return the full length of all the data.
abstract protected  longlengthOfData()
    
public  voidsend(OutputStream out)
     Write all the data to the output stream.
protected  voidsendContentTypeHeader(OutputStream out)
    
abstract protected  voidsendData(OutputStream out)
    
protected  voidsendDispositionHeader(OutputStream out)
    
protected  voidsendEnd(OutputStream out)
     Write the end data to the output stream.
protected  voidsendEndOfHeader(OutputStream out)
    
public static  voidsendParts(OutputStream out, Part[] parts)
     Write all parts and the last boundary to the specified output stream.
public static  voidsendParts(OutputStream out, Part[] parts, byte[] partBoundary)
     Write all parts and the last boundary to the specified output stream.
protected  voidsendStart(OutputStream out)
    
protected  voidsendTransferEncodingHeader(OutputStream out)
    
 voidsetPartBoundary(byte[] boundaryBytes)
     Sets the part boundary.
public  StringtoString()
     Return a string representation of this object.

Field Detail
BOUNDARY
final protected static String BOUNDARY(Code)
The boundary org.apache.commons.httpclient.params.HttpMethodParams.MULTIPART_BOUNDARY



BOUNDARY_BYTES
final protected static byte[] BOUNDARY_BYTES(Code)
The boundary as a byte array.



CHARSET
final protected static String CHARSET(Code)
Content charset



CHARSET_BYTES
final protected static byte[] CHARSET_BYTES(Code)
Content charset as a byte array



CONTENT_DISPOSITION
final protected static String CONTENT_DISPOSITION(Code)
Content dispostion characters



CONTENT_DISPOSITION_BYTES
final protected static byte[] CONTENT_DISPOSITION_BYTES(Code)
Content dispostion as a byte array



CONTENT_TRANSFER_ENCODING
final protected static String CONTENT_TRANSFER_ENCODING(Code)
Content type header



CONTENT_TRANSFER_ENCODING_BYTES
final protected static byte[] CONTENT_TRANSFER_ENCODING_BYTES(Code)
Content type header as a byte array



CONTENT_TYPE
final protected static String CONTENT_TYPE(Code)
Content type header



CONTENT_TYPE_BYTES
final protected static byte[] CONTENT_TYPE_BYTES(Code)
Content type header as a byte array



CRLF
final protected static String CRLF(Code)
Carriage return/linefeed



CRLF_BYTES
final protected static byte[] CRLF_BYTES(Code)
Carriage return/linefeed as a byte array



EXTRA
final protected static String EXTRA(Code)
Extra characters



EXTRA_BYTES
final protected static byte[] EXTRA_BYTES(Code)
Extra characters as a byte array



QUOTE
final protected static String QUOTE(Code)
Content dispostion characters



QUOTE_BYTES
final protected static byte[] QUOTE_BYTES(Code)
Content dispostion as a byte array





Method Detail
getBoundary
public static String getBoundary()(Code)
Return the boundary string. the boundary stringPart.getPartBoundary



getCharSet
abstract public String getCharSet()(Code)
Return the character encoding of this part. the character encoding, or null to exclude the character encoding header



getContentType
abstract public String getContentType()(Code)
Returns the content type of this part. the content type, or null to exclude the content type header



getLengthOfParts
public static long getLengthOfParts(Part[] parts) throws IOException(Code)
Return the total sum of all parts and that of the last boundary
Parameters:
  parts - The parts. The total length
throws:
  IOException - If an I/O error occurs while writing the parts.



getLengthOfParts
public static long getLengthOfParts(Part[] parts, byte[] partBoundary) throws IOException(Code)
Gets the length of the multipart message including the given parts.
Parameters:
  parts - The parts.
Parameters:
  partBoundary - The ASCII bytes to use as the part boundary. The total length
throws:
  IOException - If an I/O error occurs while writing the parts.
since:
   3.0



getName
abstract public String getName()(Code)
Return the name of this part. The name.



getPartBoundary
protected byte[] getPartBoundary()(Code)
Gets the part boundary to be used. the part boundary as an array of bytes.
since:
   3.0



getTransferEncoding
abstract public String getTransferEncoding()(Code)
Return the transfer encoding of this part. the transfer encoding, or null to exclude the transfer encoding header



isRepeatable
public boolean isRepeatable()(Code)
Tests if this part can be sent more than once. true if Part.sendData(OutputStream) can be successfully called more than once.
since:
   3.0



length
public long length() throws IOException(Code)
Return the full length of all the data. If you override this method make sure to override #send(OutputStream) as well long The length.
throws:
  IOException - If an IO problem occurs



lengthOfData
abstract protected long lengthOfData() throws IOException(Code)
Return the length of the main content long The length.
throws:
  IOException - If an IO problem occurs



send
public void send(OutputStream out) throws IOException(Code)
Write all the data to the output stream. If you override this method make sure to override #length() as well
Parameters:
  out - The output stream
throws:
  IOException - If an IO problem occurs.



sendContentTypeHeader
protected void sendContentTypeHeader(OutputStream out) throws IOException(Code)
Write the content type header to the specified output stream
Parameters:
  out - The output stream
throws:
  IOException - If an IO problem occurs.



sendData
abstract protected void sendData(OutputStream out) throws IOException(Code)
Write the data to the specified output stream
Parameters:
  out - The output stream
throws:
  IOException - If an IO problem occurs.



sendDispositionHeader
protected void sendDispositionHeader(OutputStream out) throws IOException(Code)
Write the content disposition header to the specified output stream
Parameters:
  out - The output stream
throws:
  IOException - If an IO problem occurs.



sendEnd
protected void sendEnd(OutputStream out) throws IOException(Code)
Write the end data to the output stream.
Parameters:
  out - The output stream
throws:
  IOException - If an IO problem occurs.



sendEndOfHeader
protected void sendEndOfHeader(OutputStream out) throws IOException(Code)
Write the end of the header to the output stream
Parameters:
  out - The output stream
throws:
  IOException - If an IO problem occurs.



sendParts
public static void sendParts(OutputStream out, Part[] parts) throws IOException(Code)
Write all parts and the last boundary to the specified output stream.
Parameters:
  out - The stream to write to.
Parameters:
  parts - The parts to write.
throws:
  IOException - If an I/O error occurs while writing the parts.



sendParts
public static void sendParts(OutputStream out, Part[] parts, byte[] partBoundary) throws IOException(Code)
Write all parts and the last boundary to the specified output stream.
Parameters:
  out - The stream to write to.
Parameters:
  parts - The parts to write.
Parameters:
  partBoundary - The ASCII bytes to use as the part boundary.
throws:
  IOException - If an I/O error occurs while writing the parts.
since:
   3.0



sendStart
protected void sendStart(OutputStream out) throws IOException(Code)
Write the start to the specified output stream
Parameters:
  out - The output stream
throws:
  IOException - If an IO problem occurs.



sendTransferEncodingHeader
protected void sendTransferEncodingHeader(OutputStream out) throws IOException(Code)
Write the content transfer encoding header to the specified output stream
Parameters:
  out - The output stream
throws:
  IOException - If an IO problem occurs.



setPartBoundary
void setPartBoundary(byte[] boundaryBytes)(Code)
Sets the part boundary. Only meant to be used by Part.sendParts(OutputStreamPart[]byte[]) and Part.getLengthOfParts(Part[]byte[])
Parameters:
  boundaryBytes - An array of ASCII bytes.
since:
   3.0



toString
public String toString()(Code)
Return a string representation of this object. A string representation of this object.
See Also:   java.lang.Object.toString



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.