public class ByteClient extends java.lang.Object implements IsamProtocolClient
B_V1, CLOSE, CREATE, DELETE, ERROR, FIND_GE, FIND_GT, FIND_LE, FIND_LT, O_V1, OK, READ, RESULT_CLOSE, RESULT_CURRENT, RESULT_READ, UPDATE
Constructor and Description |
---|
ByteClient(java.io.InputStream is,
java.io.OutputStream os)
Create instance of ObjectClient.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close ISAM source.
|
<T> void |
create(T o)
Create record in ISAM source.
|
<T,TK> void |
delete(java.lang.Class<T> t,
Key<TK> k)
Delete record from ISAM source.
|
void |
handshake()
Send preferred version.
|
<T,TK> T |
read(java.lang.Class<T> t,
Key<TK> k)
Read record from ISAM source.
|
<T,TK> IsamResult<T> |
readXX(int cmd,
java.lang.Class<T> t,
Key<TK> k)
Find all records matching criteria.
|
void |
resultClose()
Close.
|
<T> T |
resultCurrent()
Return current record.
|
boolean |
resultRead()
Read record.
|
<T> void |
update(T o)
Update record in ISAM source.
|
public ByteClient(java.io.InputStream is, java.io.OutputStream os)
is
- input streamos
- output streampublic void handshake() throws IsamException
IsamProtocolClient
handshake
in interface IsamProtocolClient
IsamException
- if problem with ISAM sourcepublic <T,TK> T read(java.lang.Class<T> t, Key<TK> k) throws IsamException, RecordException
IsamProtocolClient
read
in interface IsamProtocolClient
T
- type of recordTK
- type of keyt
- type to readk
- key of record to readIsamException
- if problem with ISAM sourceRecordException
- if problem converting datapublic <T> void create(T o) throws IsamException, RecordException
IsamProtocolClient
create
in interface IsamProtocolClient
T
- type of recordo
- object to createIsamException
- if problem with ISAM sourceRecordException
- if problem converting datapublic <T> void update(T o) throws IsamException, RecordException
IsamProtocolClient
update
in interface IsamProtocolClient
T
- type of recordo
- object to updateIsamException
- if problem with ISAM sourceRecordException
- if problem converting datapublic <T,TK> void delete(java.lang.Class<T> t, Key<TK> k) throws IsamException, RecordException
IsamProtocolClient
delete
in interface IsamProtocolClient
T
- type of recordTK
- type of keyt
- type to deletek
- key of record to deleteIsamException
- if problem with ISAM sourceRecordException
- if problem converting datapublic void close() throws IsamException
IsamProtocolClient
close
in interface IsamProtocolClient
IsamException
- if problem with ISAM sourcepublic <T,TK> IsamResult<T> readXX(int cmd, java.lang.Class<T> t, Key<TK> k) throws IsamException, RecordException
IsamProtocolClient
readXX
in interface IsamProtocolClient
T
- type of recordTK
- type of keycmd
- FIND_xx valuet
- type to findk
- key to findIsamException
- if problem with ISAM sourceRecordException
- if problem converting datapublic boolean resultRead() throws IsamException, RecordException
IsamProtocolClient
resultRead
in interface IsamProtocolClient
IsamException
- if problem with ISAM sourceRecordException
- if problem converting datapublic <T> T resultCurrent() throws IsamException, RecordException
IsamProtocolClient
resultCurrent
in interface IsamProtocolClient
T
- type of recordIsamException
- if problem with ISAM sourceRecordException
- if problem converting datapublic void resultClose() throws IsamException
IsamProtocolClient
resultClose
in interface IsamProtocolClient
IsamException
- if problem with ISAM source