com.ximpleware.extended
Class XMLBuffer
java.lang.Object
com.ximpleware.extended.XMLBuffer
- All Implemented Interfaces:
- com.ximpleware.extended.IByteBuffer
public class XMLBuffer
- extends java.lang.Object
- implements com.ximpleware.extended.IByteBuffer
XMLBuffer is a class that reads in an XML doc into chunk-based memory buffers
the file size is equal to n*1GB + m (where m < 1GB)
Method Summary |
byte |
byteAt(long index)
|
byte[] |
getBytes()
|
byte[] |
getBytes(int offset,
int len)
Return a byte array filled with content from underlying byte storage. |
long |
length()
Total size in terms of # of bytes. |
void |
readFile(java.lang.String fileName)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLBuffer
public XMLBuffer()
XMLBuffer
public XMLBuffer(byte[] ba)
byteAt
public final byte byteAt(long index)
- Specified by:
byteAt
in interface com.ximpleware.extended.IByteBuffer
getBytes
public byte[] getBytes()
- Specified by:
getBytes
in interface com.ximpleware.extended.IByteBuffer
getBytes
public byte[] getBytes(int offset,
int len)
- Return a byte array filled with content from underlying byte storage.
- Specified by:
getBytes
in interface com.ximpleware.extended.IByteBuffer
- Parameters:
offset
- int bytes offset (not UTF char unit)len
- int
- Returns:
- byte[]
length
public long length()
- Total size in terms of # of bytes.
- Specified by:
length
in interface com.ximpleware.extended.IByteBuffer
- Returns:
- int
readFile
public void readFile(java.lang.String fileName)
throws java.io.IOException,
ParseExceptionHuge
- Parameters:
fileName
-
- Throws:
java.io.IOException
ParseException
ParseExceptionHuge