|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectfuku.eb4j.io.BookInputStream
public abstract class BookInputStream
書籍用入力ストリームの基底クラス。
フィールドの概要 | |
---|---|
protected byte[] |
_cache
キャッシュ |
protected long |
_cachePos
キャッシュデータのファイルポインタ位置 |
protected long |
_filePos
ファイルポインタ位置 |
protected fuku.eb4j.io.FileInfo |
_info
ファイル情報 |
protected RandomAccessFile |
_stream
入力ストリーム |
static int |
PAGE_SIZE
ページサイズ |
メソッドの概要 | |
---|---|
void |
close()
このファイルを閉じます。 |
protected void |
finalize()
このオブジェクトで使用されているシステムリソースを破棄します。 |
long |
getFileSize()
このファイルのファイルサイズを返します。 |
static int |
getOffset(long pos)
ページ内オフセットを返します。 |
static long |
getPage(long pos)
ページ番号を返します。 |
static long |
getPosition(long page,
int offset)
ファイルの先頭からの位置を返します。 |
long |
getRealFileSize()
このファイルの実ファイルサイズを返します。 |
int |
getSliceSize()
このファイルのスライスサイズを返します。 |
protected void |
open()
このファイルを開きます。 |
int |
read(byte[] b)
このファイルから最大b.lengthバイトのデータをバイト配列に読み込みます。 |
abstract int |
read(byte[] b,
int off,
int len)
このファイルから最大lenバイトのデータをバイト配列に読み込みます。 |
void |
readFully(byte[] b)
このファイルからb.lengthバイトのデータをバイト配列に読み込みます。 |
void |
readFully(byte[] b,
int off,
int len)
このファイルからlenバイトのデータをバイト配列に読み込みます。 |
protected int |
readRaw(byte[] b)
このファイルから最大b.lengthバイトのデータをバイト配列に読み込みます。 |
protected int |
readRaw(byte[] b,
int off,
int len)
このファイルから最大lenバイトのデータをバイト配列に読み込みます。 |
protected void |
readRawFully(byte[] b)
このファイルからb.lengthバイトのデータをバイト配列に読み込みます。 |
protected void |
readRawFully(byte[] b,
int off,
int len)
このファイルからlenバイトのデータをバイト配列に読み込みます。 |
void |
seek(long pos)
指定位置にファイルポインタを設定します。 |
void |
seek(long page,
int offset)
指定位置にファイルポインタを設定します。 |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
public static final int PAGE_SIZE
protected fuku.eb4j.io.FileInfo _info
protected RandomAccessFile _stream
protected long _filePos
protected byte[] _cache
protected long _cachePos
メソッドの詳細 |
---|
protected void finalize() throws Throwable
Object
内の finalize
Throwable
- このメソッドで生じた例外public final long getFileSize()
public final long getRealFileSize()
public final int getSliceSize()
protected final void open() throws EBException
EBException
- 入出力エラーが発生した場合public final void close()
public final void readFully(byte[] b) throws EBException
b
- データの読み込み先のバッファ
EBException
- 入出力エラーが発生した場合public final void readFully(byte[] b, int off, int len) throws EBException
b
- データの読み込み先のバッファoff
- データの開始オフセットlen
- 読み込まれる最大バイト数
EBException
- 入出力エラーが発生した場合public final int read(byte[] b) throws EBException
b
- データの読み込み先のバッファ
EBException
- 入出力エラーが発生した場合public abstract int read(byte[] b, int off, int len) throws EBException
b
- データの読み込み先のバッファoff
- データの開始オフセットlen
- 読み込まれる最大バイト数
EBException
- 入出力エラーが発生した場合public final void seek(long page, int offset)
page
- ページ番号offset
- ページ内オフセットpublic final void seek(long pos)
pos
- データ位置protected final int readRaw(byte[] b) throws EBException
b
- データの読み込み先のバッファ
EBException
- 入出力エラーが発生した場合protected final int readRaw(byte[] b, int off, int len) throws EBException
b
- データの読み込み先のバッファoff
- データの開始オフセットlen
- 読み込まれる最大バイト数
EBException
- 入出力エラーが発生した場合protected final void readRawFully(byte[] b) throws EBException
b
- データの読み込み先のバッファ
EBException
- 入出力エラーが発生した場合protected final void readRawFully(byte[] b, int off, int len) throws EBException
b
- データの読み込み先のバッファoff
- データの開始オフセットlen
- 読み込まれる最大バイト数
EBException
- 入出力エラーが発生した場合public static final long getPosition(long page, int offset)
page
- ページ番号offset
- ページ内オフセット
public static final long getPage(long pos)
pos
- 先頭からの位置
public static final int getOffset(long pos)
pos
- 先頭からの位置
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |