/** * Read a byte. * * @return the byte */ public byte readByte() throws IOException { int x = in.read(); if (x < 0) { throw new FastEOFException(); } return (byte) x; }
/** * Read a number of bytes. * * @param buff the target buffer * @param len the number of bytes to read */ public void readFully(byte[] buff, int len) throws IOException { int got = IOUtils.readFully(in, buff, len); if (got < len) { throw new FastEOFException(); } }
/** * Read a number of bytes. * * @param buff the target buffer * @param len the number of bytes to read */ public void readFully(byte[] buff, int len) throws IOException { int got = IOUtils.readFully(in, buff, len); if (got < len) { throw new FastEOFException(); } }
/** * Read a byte. * * @return the byte */ public byte readByte() throws IOException { int x = in.read(); if (x < 0) { throw new FastEOFException(); } return (byte) x; }
/** * Read a byte. * * @return the byte */ public byte readByte() throws IOException { int x = in.read(); if (x < 0) { throw new FastEOFException(); } return (byte) x; }
/** * Read a number of bytes. * * @param buff the target buffer * @param len the number of bytes to read */ public void readFully(byte[] buff, int len) throws IOException { int got = IOUtils.readFully(in, buff, len); if (got < len) { throw new FastEOFException(); } }