|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdk.vajhoej.record.Util
public class Util
Utility class to process lists and to work with files instead of byte arrays.
| Nested Class Summary | |
|---|---|
static interface |
Util.ObjectHandler<T>
Interface for processing objects read. |
static interface |
Util.Transformer<T1,T2>
Interface for converting objects read. |
| Constructor Summary | |
|---|---|
Util()
|
|
| Method Summary | ||
|---|---|---|
static
|
copyAll(java.lang.Class<T1> t1,
byte[] b,
java.lang.Class<T2> t2,
Util.Transformer<T1,T2> cvt)
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,
Util.Transformer<T1,T2> cvt)
Convert array of struct in stream into array of struct in stream. |
|
static
|
readAll(java.lang.Class<T> t,
byte[] b)
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)
Read array of struct in stream into list of objects. |
|
static
|
readAll(java.lang.Class<T> t,
java.io.InputStream is,
Util.ObjectHandler<T> oh)
Read array of struct in stream and processes them by handler. |
|
static
|
writeAll(java.lang.Class<T> t,
java.util.List<T> lst)
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)
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 Util()
| Method Detail |
|---|
public static <T> java.util.List<T> readAll(java.lang.Class<T> t,
byte[] b)
throws RecordException
t - typeb - byte array
RecordException - if problem with record definition
public static <T> byte[] writeAll(java.lang.Class<T> t,
java.util.List<T> lst)
throws RecordException
t - typelst - list of objects
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)
throws RecordException,
java.io.IOException
t - typeis - streamlst - list of objects
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)
throws RecordException,
java.io.IOException
t - typelst - list of objectsos - stream
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,
Util.ObjectHandler<T> oh)
throws RecordException,
java.io.IOException
t - typeis - streamoh - handler of objects
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,
Util.Transformer<T1,T2> cvt)
throws RecordException
t1 - from typeb - from byte arrayt2 - to typecvt - transformer class
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,
Util.Transformer<T1,T2> cvt)
throws RecordException,
java.io.IOException
t1 - from typeis - from streamt2 - to typeos - to streamcvt - transformer class
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 | ||||||||