I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 0f1036b0 authored by zzz's avatar zzz
Browse files

better message on EOF reading data

parent 86935f10
No related branches found
No related tags found
No related merge requests found
......@@ -81,7 +81,9 @@ public abstract class SimpleDataStructure extends DataStructureImpl {
int length = length();
_data = new byte[length];
int read = read(in, _data);
if (read != length) throw new DataFormatException("Not enough bytes to read the data");
if (read != length)
throw new DataFormatException("EOF reading " + getClass().getSimpleName() +
", read: " + read + ", required: " + length);
}
public void writeBytes(OutputStream out) throws DataFormatException, IOException {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment