Package com.priint.pubserver.util
Class ByteArray64
java.lang.Object
com.priint.pubserver.util.ByteArray64
This is an implementation of byte array requiring address space larger than 32 bits.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyteget(long index) Method to get the data with a given indexstatic voidExample testvoidread(InputStream inputStream) Simulates a single read which fills the entire array via several smaller reads.voidset(long index, byte b) Method to set the data with a given indexlongsize()voidwrite(OutputStream outputStream) Simulates a single read which fills the entire array via several smaller reads.
-
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
Simulates a single read which fills the entire array via several smaller reads.- Parameters:
inputStream-- Throws:
IOException
-
write
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
Example test- Parameters:
args- default- Throws:
IOException
-