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[]cacheprotected booleancacheEnabledprotected longcacheHitprotected booleanexistsprotected java.lang.StringfilePathprotected intfileSizeprotected booleanhasBeenAccessedprotected booleanhasBeenDeletedVirtualFilesystemvirtualFilesystem
-
Constructor Summary
Constructors Modifier Constructor Description protectedVFSFile(VirtualFilesystem vfs, java.lang.String filePath, boolean cacheEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandelete()booleanequals(java.lang.Object o)booleanexists()byte[]getAllBytes()byte[]getAllBytes(boolean copy)java.lang.StringgetAllChars()java.lang.String[]getAllLines()voidgetBytes(int fileOffset, byte[] array, int offset, int length)java.io.InputStreamgetInputStream()java.io.OutputStreamgetOutputStream()java.lang.StringgetPath()intgetSize()inthashCode()booleanrename(java.lang.String newName, boolean copy)booleansetAllBytes(byte[] bytes)booleansetAllBytes(byte[] bytes, boolean copy)booleansetAllChars(java.lang.String bytes)voidsetCacheEnabled()booleansync()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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()
-
-