Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: components/cronet/android/java/src/org/chromium/net/urlconnection/CronetOutputStream.java

Issue 966743003: [Cronet] Implement getOutputStream in CronetHttpURLConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chunked_support
Patch Set: Remove unused Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
+}

Powered by Google App Engine
This is Rietveld 408576698