インタフェース
java.nio.file.OpenOptionの使用
OpenOptionを使用するパッケージ
パッケージ
説明
HTTPクライアントおよびWebSocket API
入出力操作を実行できるエンティティ(ファイル、ソケットなど)への接続を表すチャネルや、多重化された非ブロック入出力操作用のセレクタを定義します。
ファイル、ファイル属性、およびファイル・システムにアクセスするためのJava仮想マシン用のインタフェースとクラスを定義します。
java.nio.fileパッケージのサービス・プロバイダ・クラス。-
java.net.httpでのOpenOptionの使用
型OpenOptionのパラメータを持つjava.net.httpのメソッド修飾子と型メソッド説明static HttpResponse.BodyHandler<Path> HttpResponse.BodyHandlers.ofFile(Path file, OpenOption... openOptions) BodySubscribers.ofFile(Path,OpenOption...)から取得されたBodySubscriber<Path>を返すBodyHandler<Path>を返します。static HttpResponse.BodySubscriber<Path> HttpResponse.BodySubscribers.ofFile(Path file, OpenOption... openOptions) 与えられたオプションと名前でオープンされたファイルにレスポンス本文を格納するBodySubscriberを返します。static HttpResponse.BodyHandler<Path> HttpResponse.BodyHandlers.ofFileDownload(Path directory, OpenOption... openOptions) ダウンロード・ディレクトリが指定されているが、ファイル名がContent-Dispositionレスポンス・ヘッダーから取得されるBodySubscriber<Path> を返すBodyHandler<Path>を返します。 -
java.nio.channelsでのOpenOptionの使用
型OpenOptionのパラメータを持つjava.nio.channelsのメソッド修飾子と型メソッド説明static AsynchronousFileChannelAsynchronousFileChannel.open(Path file, OpenOption... options) 読み込みまたは書き込み(あるいはその両方)用のファイルを開くか作成し、そのファイルにアクセスするための非同期のファイル・チャネルを返します。static FileChannelFileChannel.open(Path path, OpenOption... options) ファイルを開くか作成し、そのファイルにアクセスするためのファイル・チャネルを返します。型OpenOptionの型引数を持つjava.nio.channelsのメソッド・パラメータ修飾子と型メソッド説明static AsynchronousFileChannelAsynchronousFileChannel.open(Path file, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) 読み込みまたは書き込み(あるいはその両方)用のファイルを開くか作成し、そのファイルにアクセスするための非同期のファイル・チャネルを返します。static FileChannelFileChannel.open(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) ファイルを開くか作成し、そのファイルにアクセスするためのファイル・チャネルを返します。 -
java.nio.fileでのOpenOptionの使用
OpenOptionを実装しているjava.nio.fileのクラス型OpenOptionのパラメータを持つjava.nio.fileのメソッド修飾子と型メソッド説明static BufferedWriterFiles.newBufferedWriter(Path path, Charset cs, OpenOption... options) ファイルを書込み用に開くか作成して、そのファイルに効果的な方法でテキストを書き込むために使用できるBufferedWriterを返します。static BufferedWriterFiles.newBufferedWriter(Path path, OpenOption... options) ファイルを書込み用に開くか作成し、効率的な方法でファイルにテキストを書き込むBufferedWriterを返します。static SeekableByteChannelFiles.newByteChannel(Path path, OpenOption... options) ファイルを開くか作成し、そのファイルにアクセスするためのシーク可能なバイト・チャネルを返します。static InputStreamFiles.newInputStream(Path path, OpenOption... options) ファイルを開き、そのファイルから読み取る入力ストリームを返します。static OutputStreamFiles.newOutputStream(Path path, OpenOption... options) ファイルを開くか作成して、そのファイルにバイトを書き込むために使用できる出力ストリームを返します。static PathFiles.write(Path path, byte[] bytes, OpenOption... options) バイトをファイルに書き込みます。static PathFiles.write(Path path, Iterable<? extends CharSequence> lines, Charset cs, OpenOption... options) テキスト行をファイルに書き込みます。static PathFiles.write(Path path, Iterable<? extends CharSequence> lines, OpenOption... options) テキスト行をファイルに書き込みます。static PathFiles.writeString(Path path, CharSequence csq, Charset cs, OpenOption... options) CharSequenceをファイルに書き込みます。static PathFiles.writeString(Path path, CharSequence csq, OpenOption... options) CharSequenceをファイルに書き込みます。型OpenOptionの型引数を持つjava.nio.fileのメソッド・パラメータ修飾子と型メソッド説明static SeekableByteChannelFiles.newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) ファイルを開くか作成し、そのファイルにアクセスするためのシーク可能なバイト・チャネルを返します。SecureDirectoryStream.newByteChannel(T path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) このディレクトリ内のファイルを開くか作成し、そのファイルにアクセスするためのシーク可能なバイト・チャネルを返します。 -
java.nio.file.spiでのOpenOptionの使用
型OpenOptionのパラメータを持つjava.nio.file.spiのメソッド修飾子と型メソッド説明FileSystemProvider.newInputStream(Path path, OpenOption... options) ファイルを開き、そのファイルから読み取る入力ストリームを返します。FileSystemProvider.newOutputStream(Path path, OpenOption... options) ファイルを開くか作成して、そのファイルにバイトを書き込むために使用できる出力ストリームを返します。型OpenOptionの型引数を持つjava.nio.file.spiのメソッド・パラメータ修飾子と型メソッド説明FileSystemProvider.newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) 読み込みまたは書き込み(あるいはその両方)用のファイルを開くか作成し、そのファイルにアクセスするための非同期のファイル・チャネルを返します。abstract SeekableByteChannelFileSystemProvider.newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) ファイルを開くか作成し、そのファイルにアクセスするためのシーク可能なバイト・チャネルを返します。FileSystemProvider.newFileChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) 読み取りまたは書き込み(あるいはその両方)用のファイルを開くか作成し、そのファイルにアクセスするためのファイル・チャネルを返します。