SHARE
    TWEET
    Krenair

    Untitled

    Sep 25th, 2012
    118
    0
    Never
    Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
    Java 0.61 KB | None | 0 0
    1. /**
    2. * the first short in the stream indicates the number of bytes to read
    3. */
    4. public static byte[] readBytesFromStream(DataInputStream par0DataInputStream) throws IOException {
    5. short var1 = par0DataInputStream.readShort();
    6. if (var1 < 0) {
    7. throw new IOException("Key was smaller than nothing! Weird key!");
    8. }
    9. else {
    10. byte[] var2 = new byte[var1];
    11. par0DataInputStream.read(var2);
    12. return var2;
    13. }
    14. }
    Advertisement
    Add Comment
    Please, Sign In to add comment
    Public Pastes
    We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
    Not a member of Pastebin yet?
    Sign Up, it unlocks many cool features!

    AltStyle によって変換されたページ (->オリジナル) /