Lines Matching refs:len

159      * Reads up to <code>len</code> bytes from the stream, and stores
173 * @param len the maximum number of bytes to read.
179 * negative, <code>len</code> is negative, or <code>off +
180 * len</code> is greater than <code>b.length</code>.
185 public abstract int read(byte[] b, int off, int len) throws IOException;
187 public void readBytes(IIOByteBuffer buf, int len) throws IOException {
188 if (len < 0) {
189 throw new IndexOutOfBoundsException("len < 0!");
195 byte[] data = new byte[len];
196 len = read(data, 0, len);
200 buf.setLength(len);
343 public void readFully(byte[] b, int off, int len) throws IOException {
344 // Fix 4430357 - if off + len < 0, overflow occurred
345 if (off < 0 || len < 0 || off + len > b.length || off + len < 0) {
347 ("off < 0 || len < 0 || off + len > b.length!");
350 while (len > 0) {
351 int nbytes = read(b, off, len);
356 len -= nbytes;
364 public void readFully(short[] s, int off, int len) throws IOException {
365 // Fix 4430357 - if off + len < 0, overflow occurred
366 if (off < 0 || len < 0 || off + len > s.length || off + len < 0) {
368 ("off < 0 || len < 0 || off + len > s.length!");
371 while (len > 0) {
372 int nelts = Math.min(len, byteBuf.length/2);
376 len -= nelts;
380 public void readFully(char[] c, int off, int len) throws IOException {
381 // Fix 4430357 - if off + len < 0, overflow occurred
382 if (off < 0 || len < 0 || off + len > c.length || off + len < 0) {
384 ("off < 0 || len < 0 || off + len > c.length!");
387 while (len > 0) {
388 int nelts = Math.min(len, byteBuf.length/2);
392 len -= nelts;
396 public void readFully(int[] i, int off, int len) throws IOException {
397 // Fix 4430357 - if off + len < 0, overflow occurred
398 if (off < 0 || len < 0 || off + len > i.length || off + len < 0) {
400 ("off < 0 || len < 0 || off + len > i.length!");
403 while (len > 0) {
404 int nelts = Math.min(len, byteBuf.length/4);
408 len -= nelts;
412 public void readFully(long[] l, int off, int len) throws IOException {
413 // Fix 4430357 - if off + len < 0, overflow occurred
414 if (off < 0 || len < 0 || off + len > l.length || off + len < 0) {
416 ("off < 0 || len < 0 || off + len > l.length!");
419 while (len > 0) {
420 int nelts = Math.min(len, byteBuf.length/8);
424 len -= nelts;
428 public void readFully(float[] f, int off, int len) throws IOException {
429 // Fix 4430357 - if off + len < 0, overflow occurred
430 if (off < 0 || len < 0 || off + len > f.length || off + len < 0) {
432 ("off < 0 || len < 0 || off + len > f.length!");
435 while (len > 0) {
436 int nelts = Math.min(len, byteBuf.length/4);
440 len -= nelts;
444 public void readFully(double[] d, int off, int len) throws IOException {
445 // Fix 4430357 - if off + len < 0, overflow occurred
446 if (off < 0 || len < 0 || off + len > d.length || off + len < 0) {
448 ("off < 0 || len < 0 || off + len > d.length!");
451 while (len > 0) {
452 int nelts = Math.min(len, byteBuf.length/8);
456 len -= nelts;
460 private void toShorts(byte[] b, short[] s, int off, int len) {
463 for (int j = 0; j < len; j++) {
470 for (int j = 0; j < len; j++) {
479 private void toChars(byte[] b, char[] c, int off, int len) {
482 for (int j = 0; j < len; j++) {
489 for (int j = 0; j < len; j++) {
498 private void toInts(byte[] b, int[] i, int off, int len) {
501 for (int j = 0; j < len; j++) {
510 for (int j = 0; j < len; j++) {
521 private void toLongs(byte[] b, long[] l, int off, int len) {
524 for (int j = 0; j < len; j++) {
541 for (int j = 0; j < len; j++) {
560 private void toFloats(byte[] b, float[] f, int off, int len) {
563 for (int j = 0; j < len; j++) {
573 for (int j = 0; j < len; j++) {
585 private void toDoubles(byte[] b, double[] d, int off, int len) {
588 for (int j = 0; j < len; j++) {
606 for (int j = 0; j < len; j++) {