|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.soa.esb.actions.soap.attachment.SwapableMemoryDataSource
public class SwapableMemoryDataSource
A datasource which offloads large attachments to disk.
Constructor Summary | |
---|---|
SwapableMemoryDataSource(java.io.InputStream inputStream,
java.lang.String contentType)
Constructs a SwapableMemoryDataSource from inputStream, and contentType. |
|
SwapableMemoryDataSource(java.io.InputStream inputStream,
java.lang.String contentType,
int maxMemorySize)
Constructs a SwapableMemoryDataSource from inputStream, and
contentType. |
Method Summary | |
---|---|
void |
cleanup()
|
protected void |
finalize()
|
java.lang.String |
getContentType()
Returns the content type of this data source. |
java.io.InputStream |
getInputStream()
Returns a new input stream on this data source. |
java.lang.String |
getName()
This method always returns null. |
java.io.OutputStream |
getOutputStream()
This method always returns null. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SwapableMemoryDataSource(java.io.InputStream inputStream, java.lang.String contentType) throws java.io.IOException
SwapableMemoryDataSource
from inputStream, and contentType.
The instance then reads from the input stream, and stores it in memory unless the size
of the content is larger that 64KB, at whichpoint the stream is stored in a temporary
file on disk.
inputStream
- the stream to read fromcontentType
- the content type of this stream
java.io.IOException
public SwapableMemoryDataSource(java.io.InputStream inputStream, java.lang.String contentType, int maxMemorySize) throws java.io.IOException
SwapableMemoryDataSource
from inputStream, and
contentType. The instance then reads from the input stream, and stores it
in memory unless the size of the content is larger than maxMemorySize, at
whichpoint the stream is stored in a temporary file on disk.
inputStream
- the stream to read fromcontentType
- the content type of this streammaxMemorySize
- the maximum size in bytes that this data source is
allowed to allocate for stream storage
java.io.IOException
Method Detail |
---|
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void cleanup()
public java.lang.String getContentType()
getContentType
in interface javax.activation.DataSource
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface javax.activation.DataSource
java.io.IOException
public java.lang.String getName()
getName
in interface javax.activation.DataSource
public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in interface javax.activation.DataSource
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |