|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lowagie.text.pdf.MappedRandomAccessFile
public class MappedRandomAccessFile
A MappedByteBuffer wrapped as a RandomAccessFile
| Field Summary | |
|---|---|
private java.nio.channels.FileChannel |
channel
|
private java.nio.MappedByteBuffer |
mappedByteBuffer
|
| Constructor Summary | |
|---|---|
MappedRandomAccessFile(java.lang.String filename,
java.lang.String mode)
Constructs a new MappedRandomAccessFile instance |
|
| Method Summary | |
|---|---|
static boolean |
clean(java.nio.ByteBuffer buffer)
invokes the clean method on the ByteBuffer's cleaner |
void |
close()
|
protected void |
finalize()
invokes the close method |
java.nio.channels.FileChannel |
getChannel()
|
long |
getFilePointer()
|
private void |
init(java.nio.channels.FileChannel channel,
java.nio.channels.FileChannel.MapMode mapMode)
initializes the channel and mapped bytebuffer |
long |
length()
|
int |
read()
|
int |
read(byte[] bytes,
int off,
int len)
|
void |
seek(long pos)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.nio.MappedByteBuffer mappedByteBuffer
private java.nio.channels.FileChannel channel
| Constructor Detail |
|---|
public MappedRandomAccessFile(java.lang.String filename,
java.lang.String mode)
throws java.io.FileNotFoundException,
java.io.IOException
filename - Stringmode - String r, w or rw
java.io.FileNotFoundException
java.io.IOException| Method Detail |
|---|
private void init(java.nio.channels.FileChannel channel,
java.nio.channels.FileChannel.MapMode mapMode)
throws java.io.IOException
channel - FileChannelmapMode - FileChannel.MapMode
java.io.IOExceptionpublic java.nio.channels.FileChannel getChannel()
public int read()
RandomAccessFile.read()
public int read(byte[] bytes,
int off,
int len)
bytes - byte[]off - int offsetlen - int length
RandomAccessFile.read(byte[], int, int)public long getFilePointer()
RandomAccessFile.getFilePointer()public void seek(long pos)
pos - long positionRandomAccessFile.seek(long)public long length()
RandomAccessFile.length()
public void close()
throws java.io.IOException
java.io.IOExceptionCleans the mapped bytebuffer and closes the channel
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.ThrowableObject.finalize()public static boolean clean(java.nio.ByteBuffer buffer)
buffer - ByteBuffer
|
Hosted by Hostbasket | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||