/** * Read float array from the stream * * @param d input * @param off offset * @param len the number of float elements to read * @return the total number of bytes read into the buffer, or -1 if there is * no more data because the end of the stream has been reached. * @throws IOException */ public int read(float[] d, int off, int len) throws IOException { return rawRead(d, off * 4, len * 4); }
/** * Read long array from the stream * * @param d input * @param off offset * @param len the number of long elements to read * @return the total number of bytes read into the buffer, or -1 if there is * no more data because the end of the stream has been reached. * @throws IOException */ public int read(long[] d, int off, int len) throws IOException { return rawRead(d, off * 8, len * 8); }
/** * Read short array from the stream * * @param d input * @param off offset * @param len the number of short elements to read * @return the total number of bytes read into the buffer, or -1 if there is * no more data because the end of the stream has been reached. * @throws IOException */ public int read(short[] d, int off, int len) throws IOException { return rawRead(d, off * 2, len * 2); }
/** * Read double array from the stream * * @param d input * @param off offset * @param len the number of double elements to read * @return the total number of bytes read into the buffer, or -1 if there is * no more data because the end of the stream has been reached. * @throws IOException */ public int read(double[] d, int off, int len) throws IOException { return rawRead(d, off * 8, len * 8); }
/** * Read int array from the stream * * @param d input * @param off offset * @param len the number of int elements to read * @return the total number of bytes read into the buffer, or -1 if there is * no more data because the end of the stream has been reached. * @throws IOException */ public int read(int[] d, int off, int len) throws IOException { return rawRead(d, off * 4, len * 4); }