Class BuilderSerializer

java.lang.Object
org.basex.io.serial.Serializer
org.basex.io.serial.BuilderSerializer
All Implemented Interfaces:
Closeable, AutoCloseable

public class BuilderSerializer extends Serializer
A serializer that pipes the events directly through to a builder.
Author:
BaseX Team 2005-21, BSD License, Leo Woerteler
  • Constructor Details

    • BuilderSerializer

      public BuilderSerializer(Builder builder)
      Constructor taking a Builder.
      Parameters:
      builder - builder to be used
  • Method Details

    • text

      protected final void text(byte[] value, FTPos ftp) throws IOException
      Description copied from class: Serializer
      Serializes a text.
      Overrides:
      text in class Serializer
      Parameters:
      value - value
      ftp - full-text positions, used for visualization highlighting
      Throws:
      IOException - I/O exception
    • pi

      protected final void pi(byte[] name, byte[] value) throws IOException
      Description copied from class: Serializer
      Serializes a processing instruction.
      Overrides:
      pi in class Serializer
      Parameters:
      name - name
      value - value
      Throws:
      IOException - I/O exception
    • finishOpen

      protected final void finishOpen() throws IOException
      Description copied from class: Serializer
      Finishes an opening element node.
      Overrides:
      finishOpen in class Serializer
      Throws:
      IOException - I/O exception
    • finishEmpty

      protected void finishEmpty() throws IOException
      Description copied from class: Serializer
      Closes an empty element.
      Overrides:
      finishEmpty in class Serializer
      Throws:
      IOException - I/O exception
    • finishClose

      protected void finishClose() throws IOException
      Description copied from class: Serializer
      Closes an element.
      Overrides:
      finishClose in class Serializer
      Throws:
      IOException - I/O exception
    • comment

      protected final void comment(byte[] value) throws IOException
      Description copied from class: Serializer
      Serializes a comment.
      Overrides:
      comment in class Serializer
      Parameters:
      value - value
      Throws:
      IOException - I/O exception
    • attribute

      protected final void attribute(byte[] name, byte[] value, boolean standalone)
      Description copied from class: Serializer
      Serializes an attribute.
      Overrides:
      attribute in class Serializer
      Parameters:
      name - name
      value - value
      standalone - standalone flag
    • openDoc

      protected void openDoc(byte[] name) throws IOException
      Description copied from class: Serializer
      Opens a document.
      Overrides:
      openDoc in class Serializer
      Parameters:
      name - name
      Throws:
      IOException - I/O exception
    • closeDoc

      protected final void closeDoc() throws IOException
      Description copied from class: Serializer
      Closes a document.
      Overrides:
      closeDoc in class Serializer
      Throws:
      IOException - I/O exception