Package org.apache.synapse.commons.util
Class TemporaryData
java.lang.Object
org.apache.synapse.commons.util.TemporaryData
Deprecated.
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
ConstructorsConstructorDescriptionTemporaryData(int numberOfChunks, int chunkSize, String tempPrefix, String tempSuffix) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfinalize()Deprecated.Deprecated.longDeprecated.Deprecated.voidreadFrom(InputStream in) Deprecated.Fill this object with data read from a given InputStream.voidrelease()Deprecated.voidwriteTo(OutputStream out) Deprecated.Write the data to a given output stream.
-
Constructor Details
-
TemporaryData
Deprecated.
-
-
Method Details
-
getOutputStream
Deprecated. -
readFrom
Deprecated.Fill this object with data read from a given InputStream.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.- Parameters:
in- An InputStream to read data from. This method will not close the stream.- Throws:
IOException- in case of an error in reading fromInputStream
-
getInputStream
Deprecated.- Throws:
IOException
-
writeTo
Deprecated.Write the data to a given output stream.- Parameters:
out- The output stream to write the data to. This method will not close the stream.- Throws:
IOException- in case of an error in writing to theOutputStream
-
getLength
public long getLength()Deprecated. -
release
public void release()Deprecated. -
finalize
Deprecated.
-
OverflowBlobfrom axiom instead