public interface DataSource
InputStreams
OutputStreams
。
Modifier and Type | Method and Description |
---|---|
String |
getContentType()
此方法返回一个字符串形式的数据的MIME类型。
|
InputStream |
getInputStream()
这个方法返回一个
InputStream 表示数据和抛出相应的异常如果不能这样做。
|
String |
getName()
返回该对象的对象的名称是对底层对象的性质决定的名称。
|
OutputStream |
getOutputStream()
这个方法返回一个
OutputStream 哪里可以写入数据并把适当的例外,如果它不能这样做。
|
InputStream getInputStream() throws IOException
InputStream
并引发相应的异常如果不能这样做。值得注意的是,一个新的
InputStream
对象必须返回每次调用此方法,并且流必须定位在数据的开头。
IOException
OutputStream getOutputStream() throws IOException
OutputStream
哪里可以写入数据并把适当的例外,如果它不能这样做。值得注意的是,一个新的
OutputStream
对象必须返回每次调用此方法,并且流必须定位在位置数据写入。
IOException
String getContentType()
String getName()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.