public interface DataSource 
      InputStreams和OutputStreams的形式访问它。 
      | Modifier and Type | Method and Description | 
|---|---|
| String | getContentType()
              此方法以字符串的形式返回数据的MIME类型。 
             | 
| InputStream | getInputStream()
              此方法返回一个 
              InputStream数据的InputStream,如果不能这样做,则会抛出相应的异常。 | 
| String | getName()
              返回此对象,其中对象的名称是依赖于底层的对象的性质 
             名称 。 
             | 
| OutputStream | getOutputStream()
              此方法返回一个 
              OutputStream,其中可以写入数据,如果不能这样做,则抛出相应的异常。 | 
InputStream getInputStream() throws IOException
InputStream数据的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.