|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.synapse.commons.util.TemporaryData
OverflowBlob from axiom instead
@Deprecated public class TemporaryData
Class representing some temporary data in the form of a byte stream.
Data is stored by writing to the output stream obtained using
getOutputStream(). It can then be read back using
the input stream obtained from getInputStream().
The data is first stored into a fixed size buffer. Once this
buffer overflows, it is transferred to a temporary file. The buffer
is divided into a given number of fixed size chunks that are allocated
on demand. Since a temporary file may be created it is mandatory to
call release() to discard the temporary data.
| Constructor Summary | |
|---|---|
TemporaryData(int numberOfChunks,
int chunkSize,
String tempPrefix,
String tempSuffix)
Deprecated. |
|
| Method Summary | |
|---|---|
protected void |
finalize()
Deprecated. |
InputStream |
getInputStream()
Deprecated. |
long |
getLength()
Deprecated. |
OutputStream |
getOutputStream()
Deprecated. |
void |
readFrom(InputStream in)
Deprecated. Fill this object with data read from a given InputStream. |
void |
release()
Deprecated. |
void |
writeTo(OutputStream out)
Deprecated. Write the data to a given output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TemporaryData(int numberOfChunks,
int chunkSize,
String tempPrefix,
String tempSuffix)
| Method Detail |
|---|
public OutputStream getOutputStream()
public void readFrom(InputStream in)
throws IOException
A call tmp.readFrom(in) has the same effect as the
following code:
OutputStream out = tmp.getOutputStream(); IOUtils.copy(in, out); out.close();However it does so in a more efficient way.
in - An InputStream to read data from. This method will not
close the stream.
IOException - in case of an error in reading from InputStream
public InputStream getInputStream()
throws IOException
IOException
public void writeTo(OutputStream out)
throws IOException
out - The output stream to write the data to. This method will
not close the stream.
IOException - in case of an error in writing to the OutputStreampublic long getLength()
public void release()
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||