|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdk.vajhoej.record.Util2
public class Util2
Utility class to process lists and to work with files instead of byte arrays trying to work even with variable length structs.
| Nested Class Summary | |
|---|---|
static interface |
Util2.ObjectHandler<T>
Interface for processing objects read. |
static interface |
Util2.Transformer<T1,T2>
Interface for converting objects read. |
| Constructor Summary | |
|---|---|
Util2()
|
|
| Method Summary | ||
|---|---|---|
static
|
copyAll(java.lang.Class<T1> t1,
byte[] b,
java.lang.Class<T2> t2,
Util2.Transformer<T1,T2> cvt,
LengthProvider2 lenpvd)
Convert array of struct in bytes into array of struct in bytes. |
|
static
|
copyAll(java.lang.Class<T1> t1,
java.io.InputStream is,
java.lang.Class<T2> t2,
java.io.OutputStream os,
Util2.Transformer<T1,T2> cvt,
LengthProvider2 lenpvd)
Convert array of struct in stream into array of struct in stream. |
|
static
|
readAll(java.lang.Class<T> t,
byte[] b,
LengthProvider2 lenpvd)
Read array of struct in byte array into list of objects. |
|
static
|
readAll(java.lang.Class<T> t,
java.io.InputStream is,
java.util.List<T> lst,
LengthProvider2 lenpvd)
Read array of struct in stream into list of objects. |
|
static
|
readAll(java.lang.Class<T> t,
java.io.InputStream is,
Util2.ObjectHandler<T> oh,
LengthProvider2 lenpvd)
Read array of struct in stream and processes them by handler. |
|
static
|
writeAll(java.lang.Class<T> t,
java.util.List<T> lst,
LengthProvider2 lenpvd)
Write list of objects into array of struct in byte array. |
|
static
|
writeAll(java.lang.Class<T> t,
java.util.List<T> lst,
java.io.OutputStream os,
LengthProvider2 lenpvd)
Write list of objects into array of struct in stream. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Util2()
| Method Detail |
|---|
public static <T> java.util.List<T> readAll(java.lang.Class<T> t,
byte[] b,
LengthProvider2 lenpvd)
throws RecordException
t - typeb - byte arraylenpvd - length provider
RecordException - if problem with record definition
public static <T> byte[] writeAll(java.lang.Class<T> t,
java.util.List<T> lst,
LengthProvider2 lenpvd)
throws RecordException
t - typelst - list of objectslenpvd - length provider
RecordException - if problem with record definition
public static <T> void readAll(java.lang.Class<T> t,
java.io.InputStream is,
java.util.List<T> lst,
LengthProvider2 lenpvd)
throws RecordException,
java.io.IOException
t - typeis - streamlst - list of objectslenpvd - length provider
RecordException - if problem with record definition
java.io.IOException - if problem with stream
public static <T> void writeAll(java.lang.Class<T> t,
java.util.List<T> lst,
java.io.OutputStream os,
LengthProvider2 lenpvd)
throws RecordException,
java.io.IOException
t - typelst - list of objectsos - streamlenpvd - length provider
RecordException - if problem with record definition
java.io.IOException - if problem with stream
public static <T> void readAll(java.lang.Class<T> t,
java.io.InputStream is,
Util2.ObjectHandler<T> oh,
LengthProvider2 lenpvd)
throws RecordException,
java.io.IOException
t - typeis - streamoh - handler of objectslenpvd - length provider
RecordException - if problem with record definition
java.io.IOException - if problem with stream
public static <T1,T2> byte[] copyAll(java.lang.Class<T1> t1,
byte[] b,
java.lang.Class<T2> t2,
Util2.Transformer<T1,T2> cvt,
LengthProvider2 lenpvd)
throws RecordException
t1 - from typeb - from byte arrayt2 - to typecvt - transformer classlenpvd - length provider
RecordException - if problem with record definitions
public static <T1,T2> void copyAll(java.lang.Class<T1> t1,
java.io.InputStream is,
java.lang.Class<T2> t2,
java.io.OutputStream os,
Util2.Transformer<T1,T2> cvt,
LengthProvider2 lenpvd)
throws RecordException,
java.io.IOException
t1 - from typeis - from streamt2 - to typeos - to streamcvt - transformer classlenpvd - length provider
RecordException - if problem with record definitions
java.io.IOException - if problem with streams
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||