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 voidclose()voidflush()voidforce()voidget(byte[] dst, int offset, int length)byteget(int index)voidget(int index, byte[] dst, int offset, int length)longgetFilePointer()intgetInt(int index)longgetLong(int index)shortgetShort(int index)booleanisDirty()booleanisMapped()longlength()voidput(byte[] src, int offset, int length)voidput(int index, byte value)voidput(int index, byte[] src, int offset, int length)voidputInt(int index, int value)voidputLong(int index, long value)voidputShort(int index, short value)bytereadByte()charreadChar()intreadInt()longreadLong()shortreadShort()intreadUnsignedShort()StringreadUTF()voidresize(int size)voidseek(long pos)voidwriteByte(byte value)voidwriteChar(char value)voidwriteInt(int value)voidwriteLong(long value)voidwriteShort(int value)voidwriteUTF(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()
-
-