1 /*
2 * Copyright 2009 Red Hat, Inc.
3 *
4 * Red Hat licenses this file to you under the Apache License, version 2.0
5 * (the "License"); you may not use this file except in compliance with the
6 * License. You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations
14 * under the License.
15 */
16 package org.jboss.netty.handler.codec.http2;
17
18 /**
19 * FileUpload interface that could be in memory, on temporary file or any other implementations.
20 *
21 * Most methods are inspired from java.io.File API.
22 *
23 * @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
24 * @author Andy Taylor (andy.taylor@jboss.org)
25 * @author <a href="http://gleamynode.net/">Trustin Lee</a>
26 * @author <a href="http://openr66.free.fr/">Frederic Bregier</a>
27 *
28 */
29 public interface FileUpload extends HttpData {
30 /**
31 * Returns the original filename in the client's filesystem,
32 * as provided by the browser (or other client software).
33 * @return the original filename
34 */
35 public String getFilename();
36
37 /**
38 * Set the original filename
39 * @param filename
40 */
41 public void setFilename(String filename);
42
43 /**
44 * Set the Content Type passed by the browser if defined
45 * @param contentType Content Type to set - must be not null
46 */
47 public void setContentType(String contentType);
48
49 /**
50 * Returns the content type passed by the browser or null if not defined.
51 * @return the content type passed by the browser or null if not defined.
52 */
53 public String getContentType();
54
55 /**
56 * Set the Content-Transfer-Encoding type from String as 7bit, 8bit or binary
57 * @param contentTransferEncoding
58 */
59 public void setContentTransferEncoding(String contentTransferEncoding);
60
61 /**
62 * Returns the Content-Transfer-Encoding
63 * @return the Content-Transfer-Encoding
64 */
65 public String getContentTransferEncoding();
66 }