|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ximpleware.extended.XMLMemMappedBuffer
public class XMLMemMappedBuffer
XMLMemMappedBuffer maps an XML document into memory using memory map. It avoids the complete loading of the document in memory thus making it possible to process very large files. But the trade off is potentially lower performance due to disk IO.
| Constructor Summary | |
|---|---|
XMLMemMappedBuffer()
|
|
| Method Summary | |
|---|---|
byte |
byteAt(long index)
Get the byte at the given index of the underlying byte storage. |
byte[] |
getBytes()
NOt implemented yet |
byte[] |
getBytes(int offset,
int len)
not implemented yet |
long |
length()
Total size in terms of # of bytes. |
void |
readFile(String fileName)
|
void |
writeToFileOutputStream(FileOutputStream ost,
long os,
long len)
write the segment (denoted by its offset and length) into an output file stream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLMemMappedBuffer()
| Method Detail |
|---|
public long length()
IByteBuffer
length in interface IByteBufferpublic byte byteAt(long index)
IByteBuffer
byteAt in interface IByteBuffer
public void readFile(String fileName)
throws IOException,
ParseExceptionHuge
IOException
ParseExceptionHugepublic byte[] getBytes()
getBytes in interface IByteBuffer
public byte[] getBytes(int offset,
int len)
getBytes in interface IByteBufferoffset - int bytes offset (not UTF char unit)len - int
public void writeToFileOutputStream(FileOutputStream ost,
long os,
long len)
throws IOException
writeToFileOutputStream in interface IByteBufferIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||