Class ByteArray64

java.lang.Object
com.priint.pubserver.util.ByteArray64

public class ByteArray64 extends Object
This is an implementation of byte array requiring address space larger than 32 bits.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ByteArray64(long size)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    byte
    get(long index)
    Method to get the data with a given index
    static void
    main(String[] args)
    Example test
    void
    read(InputStream inputStream)
    Simulates a single read which fills the entire array via several smaller reads.
    void
    set(long index, byte b)
    Method to set the data with a given index
    long
     
    void
    write(OutputStream outputStream)
    Simulates a single read which fills the entire array via several smaller reads.

    Methods inherited from class java.lang.Object

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

    • ByteArray64

      public ByteArray64(long size)
      Constructor
      Parameters:
      size - of the byte array to be created
  • Method Details

    • get

      public byte get(long index)
      Method to get the data with a given index
      Parameters:
      index - index of the data element
      Returns:
      data as byte[][]
    • set

      public void set(long index, byte b)
      Method to set the data with a given index
      Parameters:
      index - index of the data element
    • read

      public void read(InputStream inputStream) throws IOException
      Simulates a single read which fills the entire array via several smaller reads.
      Parameters:
      inputStream -
      Throws:
      IOException
    • write

      public void write(OutputStream outputStream) throws IOException
      Simulates a single read which fills the entire array via several smaller reads.
      Parameters:
      outputStream -
      Throws:
      IOException
    • size

      public long size()
      Returns:
      size of the ByteArray
    • main

      public static void main(String[] args)
      Example test
      Parameters:
      args - default
      Throws:
      IOException