/** Read bytes from the stream into the given array. */ @Override public void readFully(byte[] array) throws IOException { readFully(array, 0, array.length); }
/** Read bytes from the stream into the given array. */ @Override public void readFully(byte[] array) throws IOException { readFully(array, 0, array.length); }
/** * Read a string of length n. * * @param n the number of bytes to read * @return a string representing the next <code>n</code> bytes in the stream * @throws IOException if there is an error during reading */ public String readString(int n) throws IOException { byte[] b = new byte[n]; readFully(b); return new String(b, Constants.ENCODING); }
/** Read a string of length n. */ public String readString(int n) throws IOException { byte[] b = new byte[n]; readFully(b); return new String(b, Constants.ENCODING); }