1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. |
4 | |
5 | package org.chromium.android_webview; |
6 | |
7 | import org.chromium.base.CalledByNative; |
8 | import org.chromium.base.JNINamespace; |
9 | |
10 | import java.io.InputStream; |
11 | |
12 | /** |
13 | * The response information that is to be returned for a particular resource fetch. |
14 | */ |
15 | @JNINamespace("android_webview") |
16 | public class InterceptedRequestData { |
17 | private String mMimeType; |
18 | private String mCharset; |
19 | private InputStream mData; |
20 | |
21 | public InterceptedRequestData(String mimeType, String encoding, InputStream data) { |
22 | mMimeType = mimeType; |
23 | mCharset = encoding; |
24 | mData = data; |
25 | } |
26 | |
27 | @CalledByNative |
28 | public String getMimeType() { |
29 | return mMimeType; |
30 | } |
31 | |
32 | @CalledByNative |
33 | public String getCharset() { |
34 | return mCharset; |
35 | } |
36 | |
37 | @CalledByNative |
38 | public InputStream getData() { |
39 | return mData; |
40 | } |
41 | } |