Class ByteGetter


  • public class ByteGetter
    extends java.lang.Object
    Allows reading bytes from a String in hex format.
    Author:
    Sebastian Baumhekel
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteGetter​(java.lang.String rep)
      Constructs an instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int get​(int index)
      Gets a byte at the given index.
      byte[] getBytes()
      Gets all bytes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ByteGetter

        public ByteGetter​(java.lang.String rep)
        Constructs an instance.
        Parameters:
        rep - String
    • Method Detail

      • get

        public int get​(int index)
        Gets a byte at the given index.
        Parameters:
        index - index
        Returns:
        byte
        Throws:
        java.lang.IndexOutOfBoundsException - if the index is out of the range of the String
      • getBytes

        public byte[] getBytes()
        Gets all bytes.
        Returns:
        bytes