|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjavax.activation.URLDataSource
public class URLDataSource
URLDataSource 類別提供一個物件,此物件將 URL 物件包裹在 DataSource 介面中。URLDataSource 簡化了 JavaBeans Activation Framework 中 URL 描述的資料處理方法,因為此類別可用於創建新的 DataHandler。註:當用 URL 建構 DataHandler 物件時,DataHandler 物件在內部創建一個 URLDataSource。
DataSource,
DataHandler| 建構子摘要 | |
|---|---|
URLDataSource(URL url)
URLDataSource 建構子。 |
|
| 方法摘要 | |
|---|---|
String |
getContentType()
返回 URL 內容-型別 (content-type) 頭欄位的值。 |
InputStream |
getInputStream()
URL 的 getInputStream 方法。 |
String |
getName()
調用用於實例化物件的 URL 的 getFile 方法。 |
OutputStream |
getOutputStream()
URL 的 getOutputStream 方法。 |
URL |
getURL()
返回用於創建此 DataSource 的 URL。 |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 建構子詳細資訊 |
|---|
public URLDataSource(URL url)
url - 要封裝在此物件中的 URL。| 方法詳細資訊 |
|---|
public String getContentType()
URLConnection.getContentType 方法。註:此方法嘗試調用 URL 的 openConnection 方法。如果此方法失敗,或內容型別不是從 URLConnection 返回的,則 getContentType 返回 "application/octet-stream" 作為內容型別。
DataSource 中的 getContentTypepublic String getName()
getFile 方法。
DataSource 中的 getName
public InputStream getInputStream()
throws IOException
openStream 方法。
DataSource 中的 getInputStreamIOException
public OutputStream getOutputStream()
throws IOException
DataSource 中的 getOutputStreamIOExceptionpublic URL getURL()
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。