This commit is contained in:
zzz
2012-03-16 12:18:04 +00:00
parent 045627a583
commit fb8244ee1a

View File

@@ -90,6 +90,9 @@ public class I2NPMessageHandler {
return lastRead(); return lastRead();
} }
/**
* Result is retreived with lastRead()
*/
public int readMessage(byte data[], int offset) throws I2NPMessageException { public int readMessage(byte data[], int offset) throws I2NPMessageException {
return readMessage(data, offset, data.length - offset); return readMessage(data, offset, data.length - offset);
} }
@@ -98,6 +101,8 @@ public class I2NPMessageHandler {
* Set a limit on the max to read from the data buffer, so that * Set a limit on the max to read from the data buffer, so that
* we can use a large buffer but prevent the reader from reading off the end. * we can use a large buffer but prevent the reader from reading off the end.
* *
* Result is retreived with lastRead()
*
* @param maxLen read no more than this many bytes from data starting at offset, even if it is longer * @param maxLen read no more than this many bytes from data starting at offset, even if it is longer
* must be at least 16 * must be at least 16
* @since 0.8.12 * @since 0.8.12