Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * the first short in the stream indicates the number of bytes to read
- */
- public static byte[] readBytesFromStream(DataInputStream par0DataInputStream) throws IOException {
- short var1 = par0DataInputStream.readShort();
- if (var1 < 0) {
- throw new IOException("Key was smaller than nothing! Weird key!");
- }
- else {
- byte[] var2 = new byte[var1];
- par0DataInputStream.read(var2);
- return var2;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment