Index: components/cronet/android/java/src/org/chromium/net/urlconnection/CronetOutputStream.java |
diff --git a/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetOutputStream.java b/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetOutputStream.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..45d0ae7d44afec900b058ee6eb58a807dd2672d3 |
--- /dev/null |
+++ b/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetOutputStream.java |
@@ -0,0 +1,28 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package org.chromium.net.urlconnection; |
+ |
+import org.chromium.net.UploadDataProvider; |
+ |
+import java.io.IOException; |
+import java.io.OutputStream; |
+ |
+/** |
+ * An abstract class of {@link OutputStream} that concrete implementations must |
+ * extend in order to be used in {@link CronetHttpURLConnection}. |
+ */ |
+abstract class CronetOutputStream extends OutputStream implements UploadDataProvider { |
+ /** |
+ * Tells the underlying implementation that connection has been established. |
+ * Used in {@link CronetHttpURLConnection}. |
+ */ |
+ abstract void setConnected() throws IOException; |
+ |
+ /** |
+ * Checks whether content received is less than Content-Length. |
+ * Used in {@link CronetHttpURLConnection}. |
+ */ |
+ abstract void checkReceivedEnoughContent() throws IOException; |
+} |