Class MappedRandomAccessFile
java.lang.Object
com.lowagie.text.pdf.MappedRandomAccessFile
- All Implemented Interfaces:
AutoCloseable
Deprecated.
A
MappedByteBuffer wrapped as a RandomAccessFile-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FileChannelDeprecated.private LongMappedByteBufferDeprecated. -
Constructor Summary
ConstructorsConstructorDescriptionMappedRandomAccessFile(String filename, String mode) Deprecated.Constructs a new MappedRandomAccessFile instance -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.Cleans the mapped bytebuffer and closes the channelDeprecated.longDeprecated.private voidinit(FileChannel channel, FileChannel.MapMode mapMode) Deprecated.initializes the channel and mapped bytebufferlonglength()Deprecated.intread()Deprecated.intread(byte[] bytes, int off, int len) Deprecated.voidseek(long pos) Deprecated.
-
Field Details
-
mappedByteBuffer
Deprecated. -
channel
Deprecated.
-
-
Constructor Details
-
MappedRandomAccessFile
Deprecated.Constructs a new MappedRandomAccessFile instance- Parameters:
filename- Stringmode- String r, w or rw- Throws:
FileNotFoundException- on errorIOException- on error
-
-
Method Details
-
init
Deprecated.initializes the channel and mapped bytebuffer- Parameters:
channel- FileChannelmapMode- FileChannel.MapMode- Throws:
IOException
-
getChannel
-
read
public int read()Deprecated.- Returns:
- int next byte value or -1 on EOF
- See Also:
-
read
public int read(byte[] bytes, int off, int len) Deprecated.- Parameters:
bytes- byte[]off- int offsetlen- int length- Returns:
- int bytes read or -1 on EOF
- See Also:
-
getFilePointer
public long getFilePointer()Deprecated.- Returns:
- long
- See Also:
-
seek
public void seek(long pos) Deprecated.- Parameters:
pos- long position- See Also:
-
length
public long length()Deprecated.- Returns:
- long length
- See Also:
-
close
Deprecated.Cleans the mapped bytebuffer and closes the channel- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- on error- See Also:
-