Index: components/cronet/android/java/src/org/chromium/net/urlconnection/CronetBufferedOutputStream.java |
diff --git a/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetBufferedOutputStream.java b/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetBufferedOutputStream.java |
index e5a7090c3faca500d76507538e6d0100292bf8d2..1367a2de537e9d2eb5faf010674013137dfdd565 100644 |
--- a/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetBufferedOutputStream.java |
+++ b/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetBufferedOutputStream.java |
@@ -71,18 +71,18 @@ final class CronetBufferedOutputStream extends CronetOutputStream { |
@Override |
public void write(int oneByte) throws IOException { |
+ checkNotClosed(); |
ensureCanWrite(1); |
mBuffer.put((byte) oneByte); |
} |
@Override |
public void write(byte[] buffer, int offset, int count) throws IOException { |
+ checkNotClosed(); |
ensureCanWrite(count); |
mBuffer.put(buffer, offset, count); |
} |
- // TODO(xunjieli): implement close(). |
- |
/** |
* Ensures that {@code count} bytes can be written to the internal buffer. |
*/ |