public class BodyPartEntity extends Object implements Closeable
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 and Description |
---|
BodyPartEntity(org.jvnet.mimepull.MIMEPart mimePart)
Construct a new
BodyPartEntity with a MIMEPart . |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Clean up temporary file(s), if any were utilized.
|
void |
close()
Defer to
cleanup() . |
InputStream |
getInputStream()
Get the input stream to the raw bytes of this body part entity.
|
public BodyPartEntity(org.jvnet.mimepull.MIMEPart mimePart)
BodyPartEntity
with a MIMEPart
.mimePart
- MIMEPart
containing the input stream
of this body part entity.public InputStream getInputStream()
public void cleanup()
public void close() throws IOException
cleanup()
.close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2013 Oracle Corporation. All rights reserved.