F - このオブジェクトによって転送されるファイル・オブジェクトの種類public class ForwardingFileObject<F extends FileObject> extends Object implements FileObject
| 修飾子と型 | フィールド | 説明 |
|---|---|---|
protected F |
fileObject |
すべてのメソッドが委譲される、委譲先のファイル・オブジェクトです。
|
| 修飾子 | コンストラクタ | 説明 |
|---|---|---|
protected |
ForwardingFileObject(F fileObject) |
ForwardingFileObjectの新しいインスタンスを生成します。
|
| 修飾子と型 | メソッド | 説明 |
|---|---|---|
boolean |
delete() |
このファイル・オブジェクトを削除します。
|
CharSequence |
getCharContent(boolean ignoreEncodingErrors) |
可能であれば、このファイル・ダイアログの文字コンテンツを取得します。
|
long |
getLastModified() |
このファイル・オブジェクトが最後に変更された時間を取得します。
|
String |
getName() |
このファイル・オブジェクトを示す、ユーザーが使いやすい名前を取得します。
|
InputStream |
openInputStream() |
このファイル・オブジェクトのInputStreamを取得します。
|
OutputStream |
openOutputStream() |
このファイル・オブジェクトのOutputStreamを取得します。
|
Reader |
openReader(boolean ignoreEncodingErrors) |
このオブジェクトのリーダーを取得します。
|
Writer |
openWriter() |
このファイル・オブジェクトのWriterを取得します。
|
URI |
toUri() |
このファイル・オブジェクトを識別するURIを返します。
|
protected final F extends FileObject fileObject
protected ForwardingFileObject(F fileObject)
fileObject - このファイル・オブジェクトに委譲される対象public URI toUri()
FileObjecttoUri、インタフェースFileObjectpublic String getName()
FileObject"BobsApp\Test.java"をコマンド行に書き込むと、このメソッドは"BobsApp\Test.java"を返すのに対して、toUriメソッドはfile:///C:/Documents%20and%20Settings/UncleBob/BobsApp/Test.javaを返すことがあります。 getName、インタフェースFileObjectpublic InputStream openInputStream() throws IOException
FileObjectopenInputStream、インタフェースFileObjectIllegalStateException - このファイル・オブジェクトが、書込み可能かつ読取り不可である場合UnsupportedOperationException - この種類のファイル・オブジェクトがバイト・アクセスをサポートしない場合IOException - 入出力エラーが発生した場合public OutputStream openOutputStream() throws IOException
FileObjectopenOutputStream、インタフェースFileObjectIllegalStateException - このファイル・オブジェクトが、読取り可能かつ書込み不可である場合UnsupportedOperationException - この種類のファイル・オブジェクトがバイト・アクセスをサポートしない場合IOException - 入出力エラーが発生した場合public Reader openReader(boolean ignoreEncodingErrors) throws IOException
FileObjectignoreEncodingErrorsがtrueでなければ、診断情報を報告することもあります。 openReader、インタフェースFileObjectignoreEncodingErrors - trueの場合はエンコーディング・エラーを無視IllegalStateException - このファイル・オブジェクトが、書込み可能かつ読取り不可である場合UnsupportedOperationException - この種類のファイル・オブジェクトが文字アクセスをサポートしない場合IOException - 入出力エラーが発生した場合public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException
FileObjectignoreEncodingErrorsがtrueでなければ、診断情報が報告されることもあります。 getCharContent、インタフェースFileObjectignoreEncodingErrors - trueの場合はエンコーディング・エラーを無視nullIllegalStateException - このファイル・オブジェクトが、書込み可能かつ読取り不可である場合UnsupportedOperationException - この種類のファイル・オブジェクトが文字アクセスをサポートしない場合IOException - 入出力エラーが発生した場合public Writer openWriter() throws IOException
FileObjectopenWriter、インタフェースFileObjectIllegalStateException - このファイル・オブジェクトが、読取り可能かつ書込み不可である場合UnsupportedOperationException - この種類のファイル・オブジェクトが文字アクセスをサポートしない場合IOException - 入出力エラーが発生した場合public long getLastModified()
FileObjectgetLastModified、インタフェースFileObjectpublic boolean delete()
FileObjectdelete、インタフェースFileObject バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。