Class JulieXMLMemMappedBuffer

  • All Implemented Interfaces:
    com.ximpleware.extended.IByteBuffer

    public class JulieXMLMemMappedBuffer
    extends Object
    implements com.ximpleware.extended.IByteBuffer
    Copied from XMLMemMappedBuffer of VTD XML 2.11 and added writeToPipe for having a method to get fragments of an XML document without writing these fragments directly to a file.
    Author:
    faessler
    • Constructor Detail

      • JulieXMLMemMappedBuffer

        public JulieXMLMemMappedBuffer()
    • Method Detail

      • length

        public long length()
        Specified by:
        length in interface com.ximpleware.extended.IByteBuffer
      • byteAt

        public byte byteAt​(long index)
        Specified by:
        byteAt in interface com.ximpleware.extended.IByteBuffer
      • readFile

        public void readFile​(String fileName)
                      throws IOException,
                             com.ximpleware.extended.ParseExceptionHuge
        Throws:
        IOException
        com.ximpleware.extended.ParseExceptionHuge
      • getBytes

        public byte[] getBytes()
        NOt implemented yet
        Specified by:
        getBytes in interface com.ximpleware.extended.IByteBuffer
      • getBytes

        public byte[] getBytes​(int offset,
                               int len)
        not implemented yet
        Specified by:
        getBytes in interface com.ximpleware.extended.IByteBuffer
      • writeToFileOutputStream

        public void writeToFileOutputStream​(FileOutputStream ost,
                                            long os,
                                            long len)
                                     throws IOException
        write the segment (denoted by its offset and length) into a file output file stream
        Specified by:
        writeToFileOutputStream in interface com.ximpleware.extended.IByteBuffer
        Throws:
        IOException
      • writeToPipe

        public void writeToPipe​(Pipe pipe,
                                long os,
                                long len)
                         throws IOException
        write the segment (denoted by its offset and length) into an output file stream
        Throws:
        IOException
      • close

        public void close()
        Specified by:
        close in interface com.ximpleware.extended.IByteBuffer