|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.seasar.util.nio.ChannelUtil
public abstract class ChannelUtil
Channel用のユーティリティです。
| コンストラクタの概要 | |
|---|---|
ChannelUtil()
|
|
| メソッドの概要 | |
|---|---|
static ByteBuffer |
map(FileChannel channel,
FileChannel.MapMode mode)
ファイルチャネルをメモリにマップした ByteBufferを返します。 |
static int |
read(FileChannel channel,
ByteBuffer buffer)
ファイルチャネルの内容をバイトバッファに読み込みます。 |
static int |
read(FileChannel channel,
ByteBuffer buffer,
long position)
ファイルチャネルの内容をバイトバッファに読み込みます。 |
static long |
size(FileChannel channel)
ファイルのサイズを返します。 |
static long |
transfer(FileChannel from,
FileChannel to)
ファイルチャネルfromをtoへ転送します。 |
static int |
write(FileChannel channel,
ByteBuffer buffer)
バイトバッファの内容をファイルチャネルに書き込みます。 |
static int |
write(FileChannel channel,
ByteBuffer buffer,
long position)
バイトバッファの内容をファイルチャネルに書き込みます。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public ChannelUtil()
| メソッドの詳細 |
|---|
public static ByteBuffer map(FileChannel channel,
FileChannel.MapMode mode)
ByteBufferを返します。
channel - ファイルチャネル。nullであってはいけませんmode - モード。nullであってはいけません
ByteBufferpublic static long size(FileChannel channel)
channel - ファイルチャネル。nullであってはいけません
public static int read(FileChannel channel,
ByteBuffer buffer)
channel - ファイルチャネル。nullであってはいけませんbuffer - バイトバッファ。nullであってはいけません
public static int read(FileChannel channel,
ByteBuffer buffer,
long position)
channel - ファイルチャネル。nullであってはいけませんbuffer - バイトバッファ。nullであってはいけませんposition - 読み込みを開始する位置
public static int write(FileChannel channel,
ByteBuffer buffer)
channel - ファイルチャネル。nullであってはいけませんbuffer - バイトバッファ。nullであってはいけません
public static int write(FileChannel channel,
ByteBuffer buffer,
long position)
channel - ファイルチャネル。nullであってはいけませんbuffer - バイトバッファ。nullであってはいけませんposition - 読み込みを開始する位置
public static long transfer(FileChannel from,
FileChannel to)
from - 転送元のファイルチャネル。nullであってはいけませんto - 転送先のファイルチャネル。nullであってはいけません
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||