Upstream version 5.34.92.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / android / java / src / org / xwalk / core / InterceptedRequestData.java
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 // This file is imported from the upstream.
5
6 package org.xwalk.core;
7
8 import org.chromium.base.CalledByNative;
9 import org.chromium.base.JNINamespace;
10
11 import java.io.InputStream;
12
13 /**
14  * The response information that is to be returned for a particular resource fetch.
15  */
16 @JNINamespace("xwalk")
17 public class InterceptedRequestData {
18     private String mMimeType;
19     private String mCharset;
20     private InputStream mData;
21
22     public InterceptedRequestData(String mimeType, String encoding, InputStream data) {
23         mMimeType = mimeType;
24         mCharset = encoding;
25         mData = data;
26     }
27
28     @CalledByNative
29     public String getMimeType() {
30         return mMimeType;
31     }
32
33     @CalledByNative
34     public String getCharset() {
35         return mCharset;
36     }
37
38     @CalledByNative
39     public InputStream getData() {
40         return mData;
41     }
42 }