Class JulieXMLMemMappedBuffer

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

    public class JulieXMLMemMappedBuffer
    extends java.lang.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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte byteAt​(long index)  
      void close()  
      byte[] getBytes()
      NOt implemented yet
      byte[] getBytes​(int offset, int len)
      not implemented yet
      long length()  
      void readFile​(java.lang.String fileName)  
      void writeToFileOutputStream​(java.io.FileOutputStream ost, long os, long len)
      write the segment (denoted by its offset and length) into a file output file stream
      void writeToPipe​(java.nio.channels.Pipe pipe, 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

      • 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​(java.lang.String fileName)
                      throws java.io.IOException,
                             com.ximpleware.extended.ParseExceptionHuge
        Throws:
        java.io.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​(java.io.FileOutputStream ost,
                                            long os,
                                            long len)
                                     throws java.io.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:
        java.io.IOException
      • writeToPipe

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

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