public abstract class FileCopyUtils extends ObjectSE
StreamUtils
にあります。主にフレームワーク内で使用しますが、アプリケーションコードにも役立ちます。
StreamUtils
, FileSystemUtils
修飾子と型 | フィールドと説明 |
---|---|
static int | BUFFER_SIZE バイトをコピーするときに使用されるデフォルトのバッファサイズ。 |
コンストラクターと説明 |
---|
FileCopyUtils() |
修飾子と型 | メソッドと説明 |
---|---|
static void | copy(byte[] in, FileSE out) 指定されたバイト配列の内容を指定された出力ファイルにコピーします。 |
static void | copy(byte[] in, OutputStreamSE out) 指定されたバイト配列の内容を指定された OutputStream にコピーします。 |
static int | copy(FileSE in, FileSE out) 指定された入力ファイルの内容を指定された出力ファイルにコピーします。 |
static int | copy(InputStreamSE in, OutputStreamSE out) 指定された InputStream の内容を指定された OutputStream にコピーします。 |
static int | copy(ReaderSE in, WriterSE out) 指定されたリーダーの内容を指定されたライターにコピーします。 |
static void | copy(StringSE in, WriterSE out) 指定された文字列の内容を指定されたライターにコピーします。 |
static byte[] | copyToByteArray(FileSE in) 指定された入力ファイルの内容を新しいバイト配列にコピーします。 |
static byte[] | copyToByteArray(InputStreamSE in) 指定された InputStream の内容を新しいバイト配列にコピーします。 |
static StringSE | copyToString(ReaderSE in) 指定された Reader の内容を文字列にコピーします。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public static final int BUFFER_SIZE
public static int copy(FileSE in, FileSE out) throws IOExceptionSE
in
- コピー元のファイル out
- コピーするファイル IOExceptionSE
- I/O エラーの場合 public static void copy(byte[] in, FileSE out) throws IOExceptionSE
in
- コピー元のバイト配列 out
- コピーするファイル IOExceptionSE
- I/O エラーの場合 public static byte[] copyToByteArray(FileSE in) throws IOExceptionSE
in
- コピー元のファイル IOExceptionSE
- I/O エラーの場合 public static int copy(InputStreamSE in, OutputStreamSE out) throws IOExceptionSE
in
- コピー元のストリーム out
- コピー先のストリーム IOExceptionSE
- I/O エラーの場合 public static void copy(byte[] in, OutputStreamSE out) throws IOExceptionSE
in
- コピー元のバイト配列 out
- コピー先の OutputStreamIOExceptionSE
- I/O エラーの場合 public static byte[] copyToByteArray(@Nullable InputStreamSE in) throws IOExceptionSE
in
- コピー元のストリーム (null
または空の場合があります)IOExceptionSE
- I/O エラーの場合 public static int copy(ReaderSE in, WriterSE out) throws IOExceptionSE
in
- コピー元のリーダー out
- コピー先のライター IOExceptionSE
- I/O エラーの場合 public static void copy(StringSE in, WriterSE out) throws IOExceptionSE
in
- コピー元の文字列 out
- コピー先のライター IOExceptionSE
- I/O エラーの場合 public static StringSE copyToString(@Nullable ReaderSE in) throws IOExceptionSE
in
- コピー元のリーダー (null
または空の場合があります)IOExceptionSE
- I/O エラーの場合