1
|
/**
|
2
|
* '$RCSfile$'
|
3
|
* Purpose: Interface for associating a content-type with an InputStream
|
4
|
* Copyright: 2013 Regents of the University of California and the
|
5
|
* National Center for Ecological Analysis and Synthesis
|
6
|
* Authors: Ben Leinfelder
|
7
|
*
|
8
|
* '$Author: leinfelder $'
|
9
|
* '$Date: 2013-05-23 10:20:40 -0700 (Thu, 23 May 2013) $'
|
10
|
* '$Revision: 7757 $'
|
11
|
*
|
12
|
* This program is free software; you can redistribute it and/or modify
|
13
|
* it under the terms of the GNU General Public License as published by
|
14
|
* the Free Software Foundation; either version 2 of the License, or
|
15
|
* (at your option) any later version.
|
16
|
*
|
17
|
* This program is distributed in the hope that it will be useful,
|
18
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20
|
* GNU General Public License for more details.
|
21
|
*
|
22
|
* You should have received a copy of the GNU General Public License
|
23
|
* along with this program; if not, write to the Free Software
|
24
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
25
|
*/
|
26
|
package edu.ucsb.nceas.metacat.common.query.stream;
|
27
|
|
28
|
/**
|
29
|
* Implementations should provide mechanism for identifying the content-type
|
30
|
* of the java.io.InputStream.
|
31
|
* The contentType value should be usable in such places as the HTTP Content-Type header
|
32
|
*
|
33
|
* @author leinfelder
|
34
|
*
|
35
|
*/
|
36
|
public interface ContentTypeInputStream {
|
37
|
|
38
|
|
39
|
/**
|
40
|
* Retrieve the content-type for the InputStream
|
41
|
* (e.g., "application/octet-stream"
|
42
|
* @return
|
43
|
*/
|
44
|
public String getContentType();
|
45
|
|
46
|
/**
|
47
|
* Set the content-type of the InputStream
|
48
|
* (e.g., "text/xml")
|
49
|
* @param contentType
|
50
|
*/
|
51
|
public void setContentType(String contentType);
|
52
|
|
53
|
}
|