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.WritableByteChannel; | 9 import java.nio.channels.WritableByteChannel; |
10 import java.util.Map; | 10 import java.util.Map; |
11 | 11 |
12 /** | 12 /** |
13 * Network request using the native http stack implementation. | 13 * Network request using the native http stack implementation. |
14 */ | 14 */ |
15 class ChromiumUrlRequest extends UrlRequest implements HttpUrlRequest { | 15 public class ChromiumUrlRequest extends UrlRequest implements HttpUrlRequest { |
16 | 16 |
17 private final HttpUrlRequestListener mListener; | 17 private final HttpUrlRequestListener mListener; |
18 | 18 |
19 private boolean mBufferFullResponse; | 19 private boolean mBufferFullResponse; |
20 | 20 |
21 private long mOffset; | 21 private long mOffset; |
22 | 22 |
23 private long mContentLength; | 23 private long mContentLength; |
24 | 24 |
25 private long mContentLengthLimit; | 25 private long mContentLengthLimit; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 @Override | 180 @Override |
181 public ByteBuffer getByteBuffer() { | 181 public ByteBuffer getByteBuffer() { |
182 return ((ChunkedWritableByteChannel)getSink()).getByteBuffer(); | 182 return ((ChunkedWritableByteChannel)getSink()).getByteBuffer(); |
183 } | 183 } |
184 | 184 |
185 @Override | 185 @Override |
186 public byte[] getResponseAsBytes() { | 186 public byte[] getResponseAsBytes() { |
187 return ((ChunkedWritableByteChannel)getSink()).getBytes(); | 187 return ((ChunkedWritableByteChannel)getSink()).getBytes(); |
188 } | 188 } |
189 } | 189 } |
OLD | NEW |