A
ak
UnifiedIO is a Java library that provides random access to any data stream
(even over HTTP),
and gives a clear differentiation between read only and read/write access.
UnifiedIO features the ability to access everything (files, streams, and
arrays) using one common interface, the ability to select (and change) byte
order, the ability to define a start offset and requested data length, and
HTTP transfer optimization (only requesting the required data range).
UnifiedIO is extensible through DataSource/DataSourceManager.
What's new in Version 1.3
Ability to read/write data direct into/from ANY array was added.
For example if you need to read a couple of ints:
Java IO:
InputStream in = <whatever>;
DataInputStream din = new DataInputStream(in);
int [] values = new int[100];
for(int i = 0; i < values.length; i++) {
values = din.readInt();
}
Unified IO:
InputStream in = <whatever>;
RandomAccessRO ro = RandomAccessFactory.createRO(in);
//set byte order here if needed
int [] ivalues = new int[100];
ro.readFully(ivalues);
//or interpret same data as floats
ro.seek(0L);
float[] fvalues = new float[100];
ro.readFully(fvalues);
(even over HTTP),
and gives a clear differentiation between read only and read/write access.
UnifiedIO features the ability to access everything (files, streams, and
arrays) using one common interface, the ability to select (and change) byte
order, the ability to define a start offset and requested data length, and
HTTP transfer optimization (only requesting the required data range).
UnifiedIO is extensible through DataSource/DataSourceManager.
What's new in Version 1.3
Ability to read/write data direct into/from ANY array was added.
For example if you need to read a couple of ints:
Java IO:
InputStream in = <whatever>;
DataInputStream din = new DataInputStream(in);
int [] values = new int[100];
for(int i = 0; i < values.length; i++) {
values = din.readInt();
}
Unified IO:
InputStream in = <whatever>;
RandomAccessRO ro = RandomAccessFactory.createRO(in);
//set byte order here if needed
int [] ivalues = new int[100];
ro.readFully(ivalues);
//or interpret same data as floats
ro.seek(0L);
float[] fvalues = new float[100];
ro.readFully(fvalues);