public class JulieXMLBuffer extends Object implements com.ximpleware.extended.IByteBuffer
| Constructor and Description |
|---|
JulieXMLBuffer() |
JulieXMLBuffer(byte[] ba) |
| Modifier and Type | Method and Description |
|---|---|
byte |
byteAt(long index) |
void |
close() |
byte[] |
getBytes() |
byte[] |
getBytes(int offset,
int len)
Return a byte array filled with content from underlying byte storage.
|
byte[] |
getFragment(long os,
long len)
Convenience JULIE Lab method.
|
long |
length()
Total size in terms of # of bytes.
|
void |
readFile(String fileName)
JULIE Lab adopted version of the method.
|
void |
writeToFileOutputStream(FileOutputStream ost,
long os,
long len) |
void |
writeToOutputStream(OutputStream ost,
long os,
long len)
Convenience JULIE Lab method.
|
public JulieXMLBuffer()
public JulieXMLBuffer(byte[] ba)
public void readFile(String fileName) throws IOException, com.ximpleware.extended.ParseExceptionHuge
fileName - IOExceptioncom.ximpleware.ParseExceptioncom.ximpleware.extended.ParseExceptionHugepublic final byte byteAt(long index)
byteAt in interface com.ximpleware.extended.IByteBufferpublic byte[] getBytes(int offset,
int len)
getBytes in interface com.ximpleware.extended.IByteBufferoffset - int bytes offset (not UTF char unit)len - intpublic long length()
length in interface com.ximpleware.extended.IByteBufferpublic byte[] getBytes()
getBytes in interface com.ximpleware.extended.IByteBufferpublic void writeToFileOutputStream(FileOutputStream ost, long os, long len) throws IOException
writeToFileOutputStream in interface com.ximpleware.extended.IByteBufferIOExceptionpublic void writeToOutputStream(OutputStream ost, long os, long len) throws IOException
writeToFileOutputStream(java.io.FileOutputStream, long, long)
but allows any kind of output stream as first parameter.ost - Some OutputStream to write the specified XML buffer portion
to.os - The offset, in bytes, to write to ost.len - The number of bytes to write, beginning at offset.IOException - If writing to the OutputStream fails.public byte[] getFragment(long os,
long len)
throws IOException
writeToOutputStream(OutputStream, long, long) with a
ByteArrayOutputStream to return the specified buffer portion as a byte
array.os - Offset of the XML buffer to begin extraction, in bytes.len - Number of bytes to extract.IOException - If writing to the internal ByteArrayOutputStream fails.public void close()
close in interface com.ximpleware.extended.IByteBufferCopyright © 2017 JULIE Lab Jena, Germany. All rights reserved.