com.groupdocs.search.common

Class ArrayWriter



  • public class ArrayWriter
    extends Object

    Represents a byte array data writer.

    • Constructor Summary

      Constructors 
      Constructor and Description
      ArrayWriter(byte[] array)
      Initializes a new instance of the ArrayWriter class.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void checkIndex()
      Throws an exception if writing index is not equal to the length of the array.
      byte[] getArray()
      Gets the byte array.
      int getIndex()
      Gets the current writing position.
      void write(boolean value)
      Writes a boolean value to the array.
      void write(byte value)
      Writes a byte value to the array.
      void write(char value)
      Writes a char value to the array.
      void write(double value)
      Writes a double value to the array.
      void write(int value)
      Writes an int value to the array.
      void write(long value)
      Writes a long value to the array.
      void write(String value)
      Writes a String value to the array.
    • Constructor Detail

      • ArrayWriter

        public ArrayWriter(byte[] array)

        Initializes a new instance of the ArrayWriter class.

        Parameters:
        array - The byte array to write to.
    • Method Detail

      • getArray

        public final byte[] getArray()

        Gets the byte array.

        Returns:
        The byte array.
      • getIndex

        public final int getIndex()

        Gets the current writing position.

        Returns:
        The current writing position.
      • checkIndex

        public final void checkIndex()

        Throws an exception if writing index is not equal to the length of the array.

      • write

        public final void write(byte value)

        Writes a byte value to the array.

        Parameters:
        value - The value to write to the array.
      • write

        public final void write(boolean value)

        Writes a boolean value to the array.

        Parameters:
        value - The value to write to the array.
      • write

        public final void write(char value)

        Writes a char value to the array.

        Parameters:
        value - The value to write to the array.
      • write

        public final void write(int value)

        Writes an int value to the array.

        Parameters:
        value - The value to write to the array.
      • write

        public final void write(long value)

        Writes a long value to the array.

        Parameters:
        value - The value to write to the array.
      • write

        public final void write(double value)

        Writes a double value to the array.

        Parameters:
        value - The value to write to the array.
      • write

        public final void write(String value)

        Writes a String value to the array.

        Parameters:
        value - The value to write to the array.