Class BinaryRDFParser

    • Field Detail

      • declaredValues

        private Value[] declaredValues
      • in

        private java.io.DataInputStream in
      • formatVersion

        private int formatVersion
      • charset

        private java.nio.charset.Charset charset
      • buf

        private byte[] buf
    • Constructor Detail

      • BinaryRDFParser

        public BinaryRDFParser()
    • Method Detail

      • getRDFFormat

        public RDFFormat getRDFFormat()
        Description copied from interface: RDFParser
        Gets the RDF format that this parser can parse.
      • parse

        public void parse​(java.io.Reader reader,
                          java.lang.String baseURI)
                   throws java.io.IOException,
                          RDFParseException,
                          RDFHandlerException
        Description copied from interface: RDFParser
        Parses the data from the supplied Reader, using the supplied baseURI to resolve any relative URI references.
        Parameters:
        reader - The Reader from which to read the data.
        baseURI - The URI associated with the data in the InputStream. May be null. Parsers for syntax formats that do not support relative URIs will ignore this argument.

        Note that if the data contains an embedded base URI, that embedded base URI will overrule the value supplied here (see RFC 3986 section 5.1 for details).

        Throws:
        java.io.IOException - If an I/O error occurred while data was read from the InputStream.
        RDFParseException - If the parser has found an unrecoverable parse error.
        RDFHandlerException - If the configured statement handler has encountered an unrecoverable error.
      • parse

        public void parse​(java.io.InputStream in,
                          java.lang.String baseURI)
                   throws java.io.IOException,
                          RDFParseException,
                          RDFHandlerException
        Description copied from interface: RDFParser
        Parses the data from the supplied InputStream, using the supplied baseURI to resolve any relative URI references.
        Parameters:
        in - The InputStream from which to read the data.
        baseURI - The URI associated with the data in the InputStream. May be null. Parsers for syntax formats that do not support relative URIs will ignore this argument.

        Note that if the data contains an embedded base URI, that embedded base URI will overrule the value supplied here (see RFC 3986 section 5.1 for details).

        Throws:
        java.io.IOException - If an I/O error occurred while data was read from the InputStream.
        RDFParseException - If the parser has found an unrecoverable parse error.
        RDFHandlerException - If the configured statement handler has encountered an unrecoverable error.
      • readTriple

        private Triple readTriple()
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • readId

        private int readId()
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • readString

        private java.lang.String readString()
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • readBytes

        protected byte[] readBytes​(int length)
                            throws java.io.IOException
        Throws:
        java.io.IOException