net.i2p.data.i2np
public class GarlicClove extends DataStructureImpl
Constructor and Description |
---|
GarlicClove(RouterContext context) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
estimateSize() |
Certificate |
getCertificate() |
long |
getCloveId() |
I2NPMessage |
getData() |
Date |
getExpiration() |
DeliveryInstructions |
getInstructions() |
int |
hashCode() |
int |
readBytes(byte[] source,
int offset) |
void |
readBytes(InputStream in)
Load up the current object with data from the given stream.
|
void |
setCertificate(Certificate cert) |
void |
setCloveId(long id) |
void |
setData(I2NPMessage msg) |
void |
setExpiration(Date exp) |
void |
setInstructions(DeliveryInstructions instr) |
byte[] |
toByteArray() |
String |
toString() |
void |
writeBytes(OutputStream out)
Write out the data structure to the stream, using the format defined in the
I2P data structure specification.
|
calculateHash, fromBase64, fromByteArray, read, toBase64
public GarlicClove(RouterContext context)
public DeliveryInstructions getInstructions()
public void setInstructions(DeliveryInstructions instr)
public I2NPMessage getData()
public void setData(I2NPMessage msg)
public long getCloveId()
public void setCloveId(long id)
public Date getExpiration()
public void setExpiration(Date exp)
public Certificate getCertificate()
public void setCertificate(Certificate cert)
public void readBytes(InputStream in) throws DataFormatException, IOException
DataStructure
in
- stream to read fromDataFormatException
- if the data is improperly formattedIOException
- if there was a problem reading the streampublic int readBytes(byte[] source, int offset) throws DataFormatException
DataFormatException
public void writeBytes(OutputStream out) throws DataFormatException, IOException
DataStructure
out
- stream to write toDataFormatException
- if the data was incomplete or not yet ready to be writtenIOException
- if there was a problem writing to the streampublic byte[] toByteArray()
toByteArray
in interface DataStructure
toByteArray
in class DataStructureImpl
public int estimateSize()