com.partnersoft.io.formats.dump
Class NamedObjectDumpBuilder
java.lang.Object
com.partnersoft.io.formats.dump.NamedObjectDumpBuilder
public class NamedObjectDumpBuilder
- extends java.lang.Object
This class builds NamedObjectDumps using buffered streams. More
efficient than the NamedObjectDump append methods.
Building can be stopped and restarted; this allows having a cache
of builders, stopping ones that are stale but restarting them later
when needed.
|
Constructor Summary |
NamedObjectDumpBuilder(java.lang.String filename)
Creates a NamedObjectDump file for the given filename base (everything but the extensions). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
filenameBase
protected java.lang.String filenameBase
NamedObjectDumpBuilder
public NamedObjectDumpBuilder(java.lang.String filename)
throws java.io.IOException
- Creates a NamedObjectDump file for the given filename base (everything but the extensions).
- Throws:
java.io.IOException
getFilenameBase
public java.lang.String getFilenameBase()
getDataFile
public java.io.File getDataFile()
getOffsetFile
public java.io.File getOffsetFile()
appendBytes
public void appendBytes(java.lang.String name,
byte[] victim)
throws java.io.IOException
- Throws:
java.io.IOException
appendBytes
public void appendBytes(java.lang.String name,
byte[] victim,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
appendObject
public void appendObject(java.lang.String name,
java.lang.Object victim)
throws java.io.IOException
- Throws:
java.io.IOException
writeObjectImp
public void writeObjectImp(java.lang.Object victim,
java.io.DataOutputStream outie)
throws java.io.IOException
- Throws:
java.io.IOException
clear
public void clear()
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Closes the dump. You can reopen it by creating a new object or
by calling reset();
- Throws:
java.io.IOException
sort
public void sort()
throws java.io.IOException
- Throws:
java.io.IOException
getCurrentSize
public int getCurrentSize()
reset
public void reset()
throws java.io.IOException
- Throws:
java.io.IOException