Class AbstractExportDumpObject
- java.lang.Object
-
- de.akquinet.jbosscc.guttenbase.export.AbstractExportDumpObject
-
- All Implemented Interfaces:
Externalizable
,Serializable
- Direct Known Subclasses:
ExportDumpBlob
,ExportDumpClob
,ExportDumpSqlXML
public abstract class AbstractExportDumpObject extends Object implements Externalizable
Since CLOBs/BLOBs may be quite big. we do not load them into memory completely, but read them in chunks and write the data to the output stream in a loop.© 2012-2034 akquinet tech@spree
- Author:
- M. Dahm
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_BUFFER_SIZE
-
Constructor Summary
Constructors Constructor Description AbstractExportDumpObject()
AbstractExportDumpObject(InputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
free()
InputStream
getBinaryStream()
InputStream
getBinaryStream(long pos, long length)
byte[]
getBytes(long pos, int length)
long
length()
void
readExternal(ObjectInput input)
Store read data in temporary file to avoid out of memory errors.void
writeExternal(ObjectOutput output)
Read data in chunks and write it to the outputstream to avoid out of memory errors.
-
-
-
Field Detail
-
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractExportDumpObject
public AbstractExportDumpObject()
-
AbstractExportDumpObject
public AbstractExportDumpObject(InputStream inputStream)
-
-
Method Detail
-
writeExternal
public void writeExternal(ObjectOutput output) throws IOException
Read data in chunks and write it to the outputstream to avoid out of memory errors.- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
Store read data in temporary file to avoid out of memory errors.- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
length
public long length()
-
getBytes
public byte[] getBytes(long pos, int length)
-
getBinaryStream
public InputStream getBinaryStream()
-
getBinaryStream
public InputStream getBinaryStream(long pos, long length)
-
free
public final void free()
-
-