/** * Don't imitate the JDK behaviour of reading a random number * of bytes when you can actually read them all. */ @Override public int read(byte b[], int off, int len) throws IOException { int read = 0, count; while (read != len && (count = readData(b, off, len - read)) != -1) { off += count; read += count; } position += read; if (read == 0 && read != len) return -1; return read; }
/** * Don't imitate the JDK behaviour of reading a random number * of bytes when you can actually read them all. */ public int read(byte b[], int off, int len) throws IOException { int read = 0, count; while (read != len && (count = readData(b, off, len - read)) != -1) { off += count; read += count; } position += read; if (read == 0 && read != len) return -1; return read; }
/** * Don't imitate the JDK behaviour of reading a random number * of bytes when you can actually read them all. */ @Override public int read(byte b[], int off, int len) throws IOException { int read = 0, count; while (read != len && (count = readData(b, off, len - read)) != -1) { off += count; read += count; } position += read; if (read == 0 && read != len) return -1; return read; }
/** * Don't imitate the JDK behaviour of reading a random number * of bytes when you can actually read them all. */ @Override public int read(byte b[], int off, int len) throws IOException { int read = 0, count; while (read != len && (count = readData(b, off, len - read)) != -1) { off += count; read += count; } position += read; if (read == 0 && read != len) return -1; return read; }
/** * Don't imitate the JDK behaviour of reading a random number * of bytes when you can actually read them all. */ @Override public int read(byte b[], int off, int len) throws IOException { int read = 0, count; while (read != len && (count = readData(b, off, len - read)) != -1) { off += count; read += count; } position += read; if (read == 0 && read != len) return -1; return read; }
/** * Don't imitate the JDK behaviour of reading a random number * of bytes when you can actually read them all. */ @Override public int read(byte b[], int off, int len) throws IOException { int read = 0, count; while (read != len && (count = readData(b, off, len - read)) != -1) { off += count; read += count; } position += read; if (read == 0 && read != len) return -1; return read; }