Package com.intellij.util.io
Class MappedFile
- java.lang.Object
-
- com.intellij.util.io.MappedFile
-
-
Constructor Summary
Constructors Constructor Description MappedFile(File file, int initialSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
void
force()
void
get(byte[] dst, int offset, int length)
byte
get(int index)
void
get(int index, byte[] dst, int offset, int length)
long
getFilePointer()
int
getInt(int index)
long
getLong(int index)
short
getShort(int index)
boolean
isDirty()
boolean
isMapped()
long
length()
void
put(byte[] src, int offset, int length)
void
put(int index, byte value)
void
put(int index, byte[] src, int offset, int length)
void
putInt(int index, int value)
void
putLong(int index, long value)
void
putShort(int index, short value)
byte
readByte()
char
readChar()
int
readInt()
long
readLong()
short
readShort()
int
readUnsignedShort()
String
readUTF()
void
resize(int size)
void
seek(long pos)
void
writeByte(byte value)
void
writeChar(char value)
void
writeInt(int value)
void
writeLong(long value)
void
writeShort(int value)
void
writeUTF(String value)
-
-
-
Constructor Detail
-
MappedFile
public MappedFile(File file, int initialSize) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getShort
public short getShort(int index) throws IOException
- Throws:
IOException
-
readShort
public short readShort() throws IOException
- Throws:
IOException
-
putShort
public void putShort(int index, short value) throws IOException
- Throws:
IOException
-
writeShort
public void writeShort(int value) throws IOException
- Throws:
IOException
-
getInt
public int getInt(int index) throws IOException
- Throws:
IOException
-
getLong
public long getLong(int index) throws IOException
- Throws:
IOException
-
putInt
public void putInt(int index, int value) throws IOException
- Throws:
IOException
-
putLong
public void putLong(int index, long value) throws IOException
- Throws:
IOException
-
get
public byte get(int index) throws IOException
- Throws:
IOException
-
put
public void put(int index, byte value) throws IOException
- Throws:
IOException
-
get
public void get(int index, byte[] dst, int offset, int length) throws IOException
- Throws:
IOException
-
get
public void get(byte[] dst, int offset, int length) throws IOException
- Throws:
IOException
-
put
public void put(int index, byte[] src, int offset, int length) throws IOException
- Throws:
IOException
-
seek
public void seek(long pos) throws IOException
- Throws:
IOException
-
put
public void put(byte[] src, int offset, int length) throws IOException
- Throws:
IOException
-
flush
public void flush()
-
close
public void close()
-
resize
public void resize(int size) throws IOException
- Throws:
IOException
-
length
public final long length()
-
getFilePointer
public long getFilePointer()
-
readInt
public int readInt() throws IOException
- Throws:
IOException
-
readLong
public long readLong() throws IOException
- Throws:
IOException
-
writeInt
public void writeInt(int value) throws IOException
- Throws:
IOException
-
writeLong
public void writeLong(long value) throws IOException
- Throws:
IOException
-
readUTF
public String readUTF() throws IOException
- Throws:
IOException
-
writeUTF
public void writeUTF(String value) throws IOException
- Throws:
IOException
-
readUnsignedShort
public int readUnsignedShort() throws IOException
- Throws:
IOException
-
readChar
public char readChar() throws IOException
- Throws:
IOException
-
writeChar
public void writeChar(char value) throws IOException
- Throws:
IOException
-
readByte
public byte readByte() throws IOException
- Throws:
IOException
-
writeByte
public void writeByte(byte value) throws IOException
- Throws:
IOException
-
isMapped
public boolean isMapped()
-
-