Class Position

java.lang.Object
org.apache.directory.api.util.Position

public class Position extends Object
This class is used to store the position of a token in a string.
Author:
Apache Directory Project
  • Field Details

    • start

      public int start
      The starting position in the string
    • length

      public int length
      The current token length
    • end

      public int end
      The token end position in the string
  • Constructor Details

    • Position

      public Position()
      A public constructor
    • Position

      public Position(String text)
      A public constructor
      Parameters:
      text - The String to parse
    • Position

      public Position(byte[] bytes)
      A public constructor
      Parameters:
      bytes - The bytes to parse
  • Method Details

    • getByte

      public byte getByte()
      Get the byte at the current position
      Returns:
      the byte at the current position
    • getBytes

      public byte[] getBytes()
      Get the stored bytes
      Returns:
      The interned byte[]
    • toString

      public String toString()
      Overrides:
      toString in class Object