インタフェース
java.nio.file.OpenOptionの使用
-
OpenOptionを使用しているパッケージ パッケージ 説明 java.nio.channels 入出力操作を実行できるエンティティ(ファイル、ソケットなど)への接続を表すチャネルや、多重化された非ブロック入出力操作用のセレクタを定義します。java.nio.file ファイル、ファイル属性、およびファイル・システムにアクセスするためのJava仮想マシン用のインタフェースとクラスを定義します。java.nio.file.spi java.nio.fileパッケージのサービス・プロバイダ・クラス。jdk.incubator.http 高レベルのHTTPとWebSocket API -
-
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のクラス 修飾子と型 クラス 説明 classLinkOptionシンボリック・リンクの処理方法を定義します。classStandardOpenOption標準オープン・オプションを定義します。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)テキスト行をファイルに書き込みます。OpenOption型の型引数を持つjava.nio.fileのメソッド・パラメータ 修飾子と型 メソッド 説明 static SeekableByteChannelFiles. newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)ファイルを開くか作成し、そのファイルにアクセスするためのシーク可能なバイト・チャネルを返します。SeekableByteChannelSecureDirectoryStream. newByteChannel(T path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)このディレクトリ内のファイルを開くか作成し、そのファイルにアクセスするためのシーク可能なバイト・チャネルを返します。 -
java.nio.file.spiでのOpenOptionの使用
OpenOption型のパラメータを持つjava.nio.file.spiのメソッド 修飾子と型 メソッド 説明 InputStreamFileSystemProvider. newInputStream(Path path, OpenOption... options)ファイルを開き、そのファイルから読み取る入力ストリームを返します。OutputStreamFileSystemProvider. newOutputStream(Path path, OpenOption... options)ファイルを開くか作成して、そのファイルにバイトを書き込むために使用できる出力ストリームを返します。OpenOption型の型引数を持つjava.nio.file.spiのメソッド・パラメータ 修飾子と型 メソッド 説明 AsynchronousFileChannelFileSystemProvider. newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs)読み込みまたは書き込み(あるいはその両方)用のファイルを開くか作成し、そのファイルにアクセスするための非同期のファイル・チャネルを返します。abstract SeekableByteChannelFileSystemProvider. newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)ファイルを開くか作成し、そのファイルにアクセスするためのシーク可能なバイト・チャネルを返します。FileChannelFileSystemProvider. newFileChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)読み取りまたは書き込み(あるいはその両方)用のファイルを開くか作成し、そのファイルにアクセスするためのファイル・チャネルを返します。 -
jdk.incubator.httpでのOpenOptionの使用
型OpenOptionのパラメータを持つjdk.incubator.httpのメソッド 修飾子と型 メソッド 説明 static HttpResponse.BodyHandler<Path>HttpResponse.BodyHandler. asFile(Path file, OpenOption... openOptions)BodyProcessor.asFile(Path,OpenOption...)から取得したBodyProcessor<Path>を返すBodyHandler<Path>を返します。static HttpResponse.BodyProcessor<Path>HttpResponse.BodyProcessor. asFile(Path file, OpenOption... openOptions)与えられたオプションと名前でオープンされたファイルにレスポンス本文を格納するBodyProcessorを返します。static HttpResponse.BodyHandler<Path>HttpResponse.BodyHandler. asFileDownload(Path directory, OpenOption... openOptions)ダウンロード・ディレクトリが指定されているBodyProcessor<Path>を返すBodyHandler<Path>を返しますが、ファイル名はContent-Dispositionレスポンス・ヘッダーから取得されます。
-