|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--webfunds.sox.Encodable
|
+--webfunds.token.AbstractParams
Represents a Private (signing) key for a token {item, series, expiry, log} tuple. Refer to AbstractPublicParams for common methods.
| Field Summary | |
protected long |
expiry
Tokens commonly come from a batch that is identified with a series label or an expiry date. |
protected byte[] |
item
|
protected int |
log
The quantity of the item that this token represents. |
static int |
PARAMS_VERSION
The version number for this structure: 0: current |
protected byte[] |
series
|
protected int |
subversion
The version of the subclass. |
protected int |
type
The type of token of this class See Factory for current definitions. |
protected int |
version
|
| Constructor Summary | |
AbstractParams(byte[] buf)
Reconstruct the object from a previously encoded byte array. |
|
AbstractParams(java.io.InputStream is)
Reconstruct the object from data in an input stream. |
|
| Method Summary | |
void |
decode(java.io.InputStream is)
Update this params object with the values from a token encoded as a byte array (such as previously returned from the encode() method of a token object). |
void |
encode(java.io.OutputStream os)
Encode a params as a byte array, suitable for sending to third parties for depositing. |
protected boolean |
equals(AbstractParams other)
|
long |
getExpiry()
|
byte[] |
getItem()
|
int |
getLog()
|
long |
getQty()
Note (1) that this may be derived information, the real token value may be encoded in the signature key or some other way. |
byte[] |
getSeries()
|
int |
getSubVersion()
|
int |
getType()
|
int |
getVersion()
|
java.lang.String |
toString()
|
java.lang.String |
vString()
|
| Methods inherited from class webfunds.sox.Encodable |
decode,
encode,
main,
readByteArray,
readCertificate,
readProperties,
readString,
writeByteArray,
writeCertificate,
writeProperties,
writeString |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final int PARAMS_VERSION
protected int version
protected int type
protected int subversion
protected int log
protected long expiry
protected byte[] series
protected byte[] item
| Constructor Detail |
public AbstractParams(byte[] buf)
throws TokenPacketException
buf - the previously encoded object
public AbstractParams(java.io.InputStream is)
throws TokenPacketException
is - the input stream from which to read the data| Method Detail |
public final int getVersion()
public int getType()
public int getSubVersion()
public int getLog()
public long getQty()
public long getExpiry()
public byte[] getSeries()
public byte[] getItem()
public void decode(java.io.InputStream is)
throws java.io.IOException
token - the previosly encoded token
public void encode(java.io.OutputStream os)
throws java.io.IOException
public java.lang.String toString()
public java.lang.String vString()
protected boolean equals(AbstractParams other)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||