org.apache.commons.httpclient.methods.multipart
Class StringPart

java.lang.Object
  |
  +--org.apache.commons.httpclient.methods.multipart.Part
        |
        +--org.apache.commons.httpclient.methods.multipart.StringPart

public class StringPart
extends Part

Simple string parameter for a multipart post

Since:
2.0
Author:
Matthew Albright, Jeff Dever

Constructor Summary
StringPart(java.lang.String name, java.lang.String value)
          Constructor.
 
Method Summary
 java.lang.String getName()
           
protected  long lengthOfData()
           
protected  void sendData(java.io.OutputStream out)
           
 
Methods inherited from class org.apache.commons.httpclient.methods.multipart.Part
getBoundary, length, lengthOfEnd, lengthOfEndOfHeader, lengthOfHeader, lengthOfLastBoundary, lengthOfStart, send, sendEnd, sendEndOfHeader, sendHeader, sendLastBoundary, sendStart, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringPart

public StringPart(java.lang.String name,
                  java.lang.String value)
Constructor.

Parameters:
name -
value - the string to post
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in class Part
Returns:
the name of this StringPart.

sendData

protected void sendData(java.io.OutputStream out)
                 throws java.io.IOException
Specified by:
sendData in class Part
java.io.IOException

lengthOfData

protected long lengthOfData()
                     throws java.io.IOException
Specified by:
lengthOfData in class Part
java.io.IOException


Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.