| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.net; | 5 package org.chromium.net; |
| 6 | 6 |
| 7 import java.io.IOException; | 7 import java.io.IOException; |
| 8 import java.nio.ByteBuffer; | 8 import java.nio.ByteBuffer; |
| 9 import java.nio.channels.ReadableByteChannel; | 9 import java.nio.channels.ReadableByteChannel; |
| 10 import java.util.List; | 10 import java.util.List; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 * Cancel the request in progress. | 95 * Cancel the request in progress. |
| 96 */ | 96 */ |
| 97 void cancel(); | 97 void cancel(); |
| 98 | 98 |
| 99 /** | 99 /** |
| 100 * Returns {@code true} if the request has been canceled. | 100 * Returns {@code true} if the request has been canceled. |
| 101 */ | 101 */ |
| 102 boolean isCanceled(); | 102 boolean isCanceled(); |
| 103 | 103 |
| 104 /** | 104 /** |
| 105 * Returns protocol (e.g. "quic/1+spdy/3") negotiated with server. Returns |
| 106 * empty string if no protocol was negotiated, or the protocol is not known. |
| 107 * Returns empty when using plain http or https. Must be called after |
| 108 * onResponseStarted but before request is recycled. |
| 109 */ |
| 110 String getNegotiatedProtocol(); |
| 111 |
| 112 /** |
| 105 * Returns the entire response as a ByteBuffer. | 113 * Returns the entire response as a ByteBuffer. |
| 106 */ | 114 */ |
| 107 ByteBuffer getByteBuffer(); | 115 ByteBuffer getByteBuffer(); |
| 108 | 116 |
| 109 /** | 117 /** |
| 110 * Returns the entire response as a byte array. | 118 * Returns the entire response as a byte array. |
| 111 */ | 119 */ |
| 112 byte[] getResponseAsBytes(); | 120 byte[] getResponseAsBytes(); |
| 113 | 121 |
| 114 /** | 122 /** |
| (...skipping 27 matching lines...) Expand all Loading... |
| 142 * HttpUrlConnection. | 150 * HttpUrlConnection. |
| 143 */ | 151 */ |
| 144 Map<String, List<String>> getAllHeaders(); | 152 Map<String, List<String>> getAllHeaders(); |
| 145 | 153 |
| 146 /** | 154 /** |
| 147 * Returns the exception that occurred while executing the request of null | 155 * Returns the exception that occurred while executing the request of null |
| 148 * if the request was successful. | 156 * if the request was successful. |
| 149 */ | 157 */ |
| 150 IOException getException(); | 158 IOException getException(); |
| 151 } | 159 } |
| OLD | NEW |