|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.jersey.multipart.BodyPartEntity
public class BodyPartEntity
Proxy class representing the entity of a BodyPart when a
MultiPart entity is received and parsed. Its primary purpose
is to provide an input stream to retrieve the actual data. However, it
also transparently deals with storing the data in a temporary disk file,
if it is larger than a configurable size; otherwise, the data is stored
in memory for faster processing.
| Constructor Summary | |
|---|---|
BodyPartEntity(java.io.InputStream stream)
Construct a new BodyPartEntity with a default threshold size. |
|
BodyPartEntity(java.io.InputStream stream,
int threshold)
Construct a new BodyPartEntity with a specified threshold size. |
|
| Method Summary | |
|---|---|
void |
cleanup()
Clean up the temporary file we used, if any. |
java.io.InputStream |
getInputStream()
Return an input stream to the raw bytes of this body part entity. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BodyPartEntity(java.io.InputStream stream)
throws java.io.IOException
Construct a new BodyPartEntity with a default threshold size.
stream - InputStream containing the raw bytes of
this body part
java.io.IOException - if an input/output error occurs
public BodyPartEntity(java.io.InputStream stream,
int threshold)
throws java.io.IOException
Construct a new BodyPartEntity with a specified threshold size.
stream - InputStream containing the raw bytes of
this body partthreshold - Desired threshold size
java.lang.IllegalArgumentException - if the specified threshold is
not positive
java.io.IOException - if an input/output error occurs| Method Detail |
|---|
public void cleanup()
Clean up the temporary file we used, if any.
public java.io.InputStream getInputStream()
throws java.io.IOException
Return an input stream to the raw bytes of this body part entity.
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||