public class EndianMappedByteBuffer extends Object implements EndianInputOutput
| Constructor and Description |
|---|
EndianMappedByteBuffer(File file,
FileChannel.MapMode mapMode) |
EndianMappedByteBuffer(String name,
FileChannel.MapMode mapMode) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
long |
getFilePointer() |
long |
length() |
int |
read()
Read a byte.
|
int |
read(byte[] bytes)
Read a byte.
|
double |
readDouble()
Read a big endian double.
|
int |
readInt()
Read a big endian int.
|
double |
readLEDouble()
Read a little endian double.
|
float |
readLEFloat() |
int |
readLEInt()
Read a little endian int.
|
long |
readLELong()
Read a little endian long.
|
short |
readLEShort()
Read a little endian short.
|
long |
readLong()
Read a big endian long.
|
short |
readShort()
Read a big endian short.
|
void |
seek(long index) |
void |
setLength(long length) |
int |
skipBytes(int i) |
void |
write(byte[] bytes) |
void |
write(byte[] bytes,
int offset,
int length) |
void |
write(int i)
Write a big endian int.
|
void |
writeBytes(String s) |
void |
writeDouble(double value)
Write a big endian double.
|
void |
writeFloat(float value)
Write a big endian float.
|
void |
writeInt(int value)
Write a big endian int.
|
void |
writeLEDouble(double value)
Write a little endian double.
|
void |
writeLEFloat(float value)
Write a little endian float.
|
void |
writeLEInt(int value)
Write a little endian int.
|
void |
writeLELong(long value)
Write a little endian int.
|
void |
writeLEShort(short value)
Write a little endian short.
|
void |
writeLong(long value)
Write a big endian int.
|
void |
writeShort(short value)
Write a big endian short.
|
public EndianMappedByteBuffer(File file, FileChannel.MapMode mapMode) throws IOException
IOExceptionpublic EndianMappedByteBuffer(String name, FileChannel.MapMode mapMode) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface EndianOutputclose in interface Closeableclose in interface AutoCloseableIOExceptionpublic void flush()
flush in interface EndianOutputpublic long getFilePointer()
throws IOException
getFilePointer in interface EndianOutputIOExceptionpublic long length()
throws IOException
length in interface EndianOutputlength in interface RandomAccessIOExceptionpublic int read()
throws IOException
EndianInputread in interface EndianInputIOException - If an I/O error occurs.public int read(byte[] bytes)
throws IOException
EndianInputread in interface EndianInputIOException - If an I/O error occurs.public double readDouble()
throws IOException
EndianInputreadDouble in interface EndianInputIOException - If an I/O error occurs.public int readInt()
throws IOException
EndianInputreadInt in interface EndianInputIOException - If an I/O error occurs.public double readLEDouble()
throws IOException
EndianInputreadLEDouble in interface EndianInputIOException - If an I/O error occurs.public float readLEFloat()
throws IOException
readLEFloat in interface EndianInputIOExceptionpublic int readLEInt()
throws IOException
EndianInputreadLEInt in interface EndianInputIOException - If an I/O error occurs.public long readLELong()
throws IOException
EndianInputreadLELong in interface EndianInputIOException - If an I/O error occurs.public short readLEShort()
throws IOException
EndianInputreadLEShort in interface EndianInputIOException - If an I/O error occurs.public long readLong()
throws IOException
EndianInputreadLong in interface EndianInputIOException - If an I/O error occurs.public short readShort()
throws IOException
EndianInputreadShort in interface EndianInputIOException - If an I/O error occurs.public void seek(long index)
throws IOException
seek in interface RandomAccessIOExceptionpublic void setLength(long length)
throws IOException
setLength in interface RandomAccessIOExceptionpublic int skipBytes(int i)
throws IOException
skipBytes in interface EndianInputIOExceptionpublic void write(byte[] bytes)
throws IOException
write in interface EndianOutputIOExceptionpublic void write(byte[] bytes,
int offset,
int length)
throws IOException
write in interface EndianOutputIOExceptionpublic void write(int i)
throws IOException
EndianOutputwrite in interface EndianOutputi - The int.IOException - If an I/O error occurs.public void writeBytes(String s) throws IOException
writeBytes in interface EndianOutputIOExceptionpublic void writeDouble(double value)
throws IOException
EndianOutputwriteDouble in interface EndianOutputvalue - The double.IOException - If an I/O error occurs.public void writeFloat(float value)
throws IOException
EndianOutputwriteFloat in interface EndianOutputvalue - The float.IOException - If an I/O error occurs.public void writeInt(int value)
throws IOException
EndianOutputwriteInt in interface EndianOutputvalue - The int.IOException - If an I/O error occurs.public void writeLEDouble(double value)
throws IOException
EndianOutputwriteLEDouble in interface EndianOutputvalue - The double.IOException - If an I/O error occurs.public void writeLEFloat(float value)
throws IOException
EndianOutputwriteLEFloat in interface EndianOutputvalue - The float.IOException - If an I/O error occurs.public void writeLEInt(int value)
throws IOException
EndianOutputwriteLEInt in interface EndianOutputvalue - The int.IOException - If an I/O error occurs.public void writeLELong(long value)
throws IOException
EndianOutputwriteLELong in interface EndianOutputvalue - The long.IOException - If an I/O error occurs.public void writeLEShort(short value)
throws IOException
EndianOutputwriteLEShort in interface EndianOutputvalue - The short.IOException - If an I/O error occurs.public void writeLong(long value)
throws IOException
EndianOutputwriteLong in interface EndianOutputvalue - The long.IOException - If an I/O error occurs.public void writeShort(short value)
throws IOException
EndianOutputwriteShort in interface EndianOutputvalue - The short.IOException - If an I/O error occurs.Copyright © 2015 Revolution Systems Inc.. All rights reserved.