View Javadoc

1   /*
2    * Copyright 2012 The Netty Project
3    *
4    * The Netty Project licenses this file to you under the Apache License,
5    * version 2.0 (the "License"); you may not use this file except in compliance
6    * with the 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.http.multipart;
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  public interface FileUpload extends HttpData {
24      /**
25       * Returns the original filename in the client's filesystem,
26       * as provided by the browser (or other client software).
27       * @return the original filename
28       */
29      String getFilename();
30  
31      /**
32       * Set the original filename
33       * @param filename
34       */
35      void setFilename(String filename);
36  
37      /**
38       * Set the Content Type passed by the browser if defined
39       * @param contentType Content Type to set - must be not null
40       */
41      void setContentType(String contentType);
42  
43      /**
44       * Returns the content type passed by the browser or null if not defined.
45       * @return the content type passed by the browser or null if not defined.
46       */
47      String getContentType();
48  
49      /**
50       * Set the Content-Transfer-Encoding type from String as 7bit, 8bit or binary
51       * @param contentTransferEncoding
52       */
53      void setContentTransferEncoding(String contentTransferEncoding);
54  
55      /**
56       * Returns the Content-Transfer-Encoding
57       * @return the Content-Transfer-Encoding
58       */
59      String getContentTransferEncoding();
60  }