Lines Matching refs:byteCount

44   @Override public long read(Buffer sink, long byteCount) throws IOException {
46 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount);
54 long toRead = Math.min(byteCount, buffer.size);
63 @Override public void require(long byteCount) throws IOException {
64 if (!request(byteCount)) throw new EOFException();
67 @Override public boolean request(long byteCount) throws IOException {
68 if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount);
70 while (buffer.size < byteCount) {
86 @Override public ByteString readByteString(long byteCount) throws IOException {
87 require(byteCount);
88 return buffer.readByteString(byteCount);
96 @Override public byte[] readByteArray(long byteCount) throws IOException {
97 require(byteCount);
98 return buffer.readByteArray(byteCount);
121 @Override public int read(byte[] sink, int offset, int byteCount) throws IOException {
122 checkOffsetAndCount(sink.length, offset, byteCount);
129 int toRead = (int) Math.min(byteCount, buffer.size);
133 @Override public void readFully(Buffer sink, long byteCount) throws IOException {
135 require(byteCount);
141 buffer.readFully(sink, byteCount);
167 @Override public String readUtf8(long byteCount) throws IOException {
168 require(byteCount);
169 return buffer.readUtf8(byteCount);
179 @Override public String readString(long byteCount, Charset charset) throws IOException {
180 require(byteCount);
182 return buffer.readString(byteCount, charset);
287 @Override public void skip(long byteCount) throws IOException {
289 while (byteCount > 0) {
293 long toSkip = Math.min(byteCount, buffer.size());
295 byteCount -= toSkip;
366 @Override public int read(byte[] data, int offset, int byteCount) throws IOException {
368 checkOffsetAndCount(data.length, offset, byteCount);
375 return buffer.read(data, offset, byteCount);