Class VirtualFilesystem.VFSFile
- java.lang.Object
-
- net.lax1dude.eaglercraft.v1_8.internal.vfs.VirtualFilesystem.VFSFile
-
- Enclosing class:
- VirtualFilesystem
public static class VirtualFilesystem.VFSFile extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
cache
protected boolean
cacheEnabled
protected long
cacheHit
protected boolean
exists
protected java.lang.String
filePath
protected int
fileSize
protected boolean
hasBeenAccessed
protected boolean
hasBeenDeleted
VirtualFilesystem
virtualFilesystem
-
Constructor Summary
Constructors Modifier Constructor Description protected
VFSFile(VirtualFilesystem vfs, java.lang.String filePath, boolean cacheEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
delete()
boolean
equals(java.lang.Object o)
boolean
exists()
byte[]
getAllBytes()
byte[]
getAllBytes(boolean copy)
java.lang.String
getAllChars()
java.lang.String[]
getAllLines()
void
getBytes(int fileOffset, byte[] array, int offset, int length)
java.io.InputStream
getInputStream()
java.io.OutputStream
getOutputStream()
java.lang.String
getPath()
int
getSize()
int
hashCode()
boolean
rename(java.lang.String newName, boolean copy)
boolean
setAllBytes(byte[] bytes)
boolean
setAllBytes(byte[] bytes, boolean copy)
boolean
setAllChars(java.lang.String bytes)
void
setCacheEnabled()
boolean
sync()
-
-
-
Field Detail
-
virtualFilesystem
public final VirtualFilesystem virtualFilesystem
-
cacheEnabled
protected boolean cacheEnabled
-
filePath
protected java.lang.String filePath
-
fileSize
protected int fileSize
-
hasBeenDeleted
protected boolean hasBeenDeleted
-
hasBeenAccessed
protected boolean hasBeenAccessed
-
exists
protected boolean exists
-
cache
protected byte[] cache
-
cacheHit
protected long cacheHit
-
-
Constructor Detail
-
VFSFile
protected VFSFile(VirtualFilesystem vfs, java.lang.String filePath, boolean cacheEnabled)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getPath
public java.lang.String getPath()
-
getSize
public int getSize()
-
getInputStream
public java.io.InputStream getInputStream()
-
getOutputStream
public java.io.OutputStream getOutputStream()
-
getBytes
public void getBytes(int fileOffset, byte[] array, int offset, int length)
-
setCacheEnabled
public void setCacheEnabled()
-
getAllBytes
public byte[] getAllBytes()
-
getAllChars
public java.lang.String getAllChars()
-
getAllLines
public java.lang.String[] getAllLines()
-
getAllBytes
public byte[] getAllBytes(boolean copy)
-
setAllChars
public boolean setAllChars(java.lang.String bytes)
-
setAllBytes
public boolean setAllBytes(byte[] bytes)
-
setAllBytes
public boolean setAllBytes(byte[] bytes, boolean copy)
-
sync
public boolean sync()
-
delete
public boolean delete()
-
rename
public boolean rename(java.lang.String newName, boolean copy)
-
exists
public boolean exists()
-
-