|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectds.ov2.util.APDU_byte_array
public class APDU_byte_array
APDU_Serializable
wrapper around a fixed size byte array.
Field Summary | |
---|---|
byte[] |
buf
The byte array. |
Constructor Summary | |
---|---|
APDU_byte_array(byte[] buf)
Create a APDU_byte_array by wrapping an existing byte array. |
|
APDU_byte_array(short size)
Create a new wrapped byte array of length size . |
Method Summary | |
---|---|
short |
from_byte_array(short len,
short this_index,
byte[] byte_array,
short byte_index)
Deserialization the byte array. |
boolean |
is_compatible_with(Object o)
Compatibility check for the OV-chip protocol layer. |
short |
size()
Size in bytes necessary to send or receive this object via the OV-chip protocol layer, see APDU_Serializable.size() . |
short |
to_byte_array(short len,
short this_index,
byte[] byte_array,
short byte_index)
Serialize the byte array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final byte[] buf
Constructor Detail |
---|
public APDU_byte_array(short size)
size
.
size
- length of the wrapped byte arraypublic APDU_byte_array(byte[] buf)
buf
- the byte array to wrapMethod Detail |
---|
public short size()
APDU_Serializable.size()
.
size
in interface APDU_Serializable
buf
byte arraypublic boolean is_compatible_with(Object o)
APDU_Serializable.is_compatible_with
.
Objects of this class are only compatible to objects of this class of the same size.
is_compatible_with
in interface APDU_Serializable
o
- actual argument or result
o
is an APDU_byte_array of the
same sizepublic short to_byte_array(short len, short this_index, byte[] byte_array, short byte_index)
APDU_Serializable.to_byte_array
.
to_byte_array
in interface APDU_Serializable
len
- available space in byte_array
this_index
- number of bytes that
have already been written in preceeding callsbyte_array
- data array to serialize the state intobyte_index
- index in byte_array
len
bytes, in this case len + 1
is
returned.public short from_byte_array(short len, short this_index, byte[] byte_array, short byte_index)
APDU_Serializable.from_byte_array
.
from_byte_array
in interface APDU_Serializable
len
- available data in byte_array
this_index
- number of bytes that
have already been read in preceeding callsbyte_array
- data array to deserialize frombyte_index
- index in byte_array
len
bytes, in this case len + 1
is
returned.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |