/** * {@inheritDoc} * * @throws SdkClientException * if the data length read has exceeded the expected total, or * if the total data length is not the same as the expected * total. */ @Override public int read() throws IOException { final int c = super.read(); if (c >= 0) dataLength++; checkLength(c == -1); return c; }
/** * {@inheritDoc} * * @throws SdkClientException * if the data length read has exceeded the expected total, or * if the total data length is not the same as the expected * total. */ @Override public int read(byte[] b, int off, int len) throws IOException { int readLen = super.read(b, off, len); dataLength += readLen >= 0 ? readLen : 0; checkLength(readLen == -1); return readLen; }
/** * {@inheritDoc} * * @throws SdkClientException * if {@link #includeSkipped} is true and the data length * skipped has exceeded the expected total. */ @Override public long skip(long n) throws IOException { final long skipped = super.skip(n); if (includeSkipped && skipped > 0) { dataLength += skipped; checkLength(false); } return skipped; } }
/** * {@inheritDoc} * * @throws SdkClientException * if the data length read has exceeded the expected total, or * if the total data length is not the same as the expected * total. */ @Override public int read(byte[] b, int off, int len) throws IOException { int readLen = super.read(b, off, len); dataLength += readLen >= 0 ? readLen : 0; checkLength(readLen == -1); return readLen; }
/** * {@inheritDoc} * * @throws AmazonClientException if the data length read has exceeded the * expected total, or if the total data length is not the same * as the expected total. */ @Override public int read() throws IOException { final int c = super.read(); if (c >= 0) dataLength++; checkLength(c == -1); return c; }
/** * {@inheritDoc} * * @throws AmazonClientException if the data length read has exceeded the * expected total, or if the total data length is not the same * as the expected total. */ @Override public int read(byte[] b, int off, int len) throws IOException { int readLen = super.read(b, off, len); dataLength += readLen >= 0 ? readLen : 0; checkLength(readLen == -1); return readLen; }
/** * {@inheritDoc} * * @throws SdkClientException * if {@link #includeSkipped} is true and the data length * skipped has exceeded the expected total. */ @Override public long skip(long n) throws IOException { final long skipped = super.skip(n); if (includeSkipped && skipped > 0) { dataLength += skipped; checkLength(false); } return skipped; } }
/** * {@inheritDoc} * * @throws AmazonClientException if {@link #includeSkipped} is true and the * data length skipped has exceeded the expected total. */ @Override public long skip(long n) throws IOException { final long skipped = super.skip(n); if (includeSkipped && skipped > 0) { dataLength += skipped; checkLength(false); } return skipped; } }
/** * {@inheritDoc} * * @throws SdkClientException * if the data length read has exceeded the expected total, or * if the total data length is not the same as the expected * total. */ @Override public int read() throws IOException { final int c = super.read(); if (c >= 0) dataLength++; checkLength(c == -1); return c; }
/** * {@inheritDoc} * * @throws AmazonClientException if the data length read has exceeded the * expected total, or if the total data length is not the same * as the expected total. */ @Override public int read(byte[] b, int off, int len) throws IOException { int readLen = super.read(b, off, len); dataLength += readLen >= 0 ? readLen : 0; checkLength(readLen == -1); return readLen; }
/** * {@inheritDoc} * * @throws AmazonClientException if {@link #includeSkipped} is true and the * data length skipped has exceeded the expected total. */ @Override public long skip(long n) throws IOException { final long skipped = super.skip(n); if (includeSkipped && skipped > 0) { dataLength += skipped; checkLength(false); } return skipped; } }
/** * {@inheritDoc} * * @throws AmazonClientException if the data length read has exceeded the * expected total, or if the total data length is not the same * as the expected total. */ @Override public int read(byte[] b, int off, int len) throws IOException { int readLen = super.read(b, off, len); dataLength += readLen >= 0 ? readLen : 0; checkLength(readLen == -1); return readLen; }
/** * {@inheritDoc} * * @throws SdkClientException * if the data length read has exceeded the expected total, or * if the total data length is not the same as the expected * total. */ @Override public int read() throws IOException { final int c = super.read(); if (c >= 0) dataLength++; checkLength(c == -1); return c; }
/** * {@inheritDoc} * * @throws AmazonClientException if the data length read has exceeded the * expected total, or if the total data length is not the same * as the expected total. */ @Override public int read() throws IOException { final int c = super.read(); if (c >= 0) dataLength++; checkLength(c == -1); return c; }
/** * {@inheritDoc} * * @throws AmazonClientException if the data length read has exceeded the * expected total, or if the total data length is not the same * as the expected total. */ @Override public int read() throws IOException { final int c = super.read(); if (c >= 0) dataLength++; checkLength(c == -1); return c; }
/** * {@inheritDoc} * * @throws SdkClientException * if the data length read has exceeded the expected total, or * if the total data length is not the same as the expected * total. */ @Override public int read(byte[] b, int off, int len) throws IOException { int readLen = super.read(b, off, len); dataLength += readLen >= 0 ? readLen : 0; checkLength(readLen == -1); return readLen; }
/** * {@inheritDoc} * * @throws AmazonClientException if {@link #includeSkipped} is true and the * data length skipped has exceeded the expected total. */ @Override public long skip(long n) throws IOException { final long skipped = super.skip(n); if (includeSkipped && skipped > 0) { dataLength += skipped; checkLength(false); } return skipped; } }
/** * {@inheritDoc} * * @throws SdkClientException * if {@link #includeSkipped} is true and the data length * skipped has exceeded the expected total. */ @Override public long skip(long n) throws IOException { final long skipped = super.skip(n); if (includeSkipped && skipped > 0) { dataLength += skipped; checkLength(false); } return skipped; } }