public class SimpleFile extends java.io.File implements HecFile
| Constructor and Description |
|---|
SimpleFile(java.io.File parent,
java.lang.String child) |
SimpleFile(java.lang.String pathname) |
SimpleFile(java.lang.String parent,
java.lang.String child) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
appendByteArray(byte[] byteArray)
Appends byteArray to the end of this file.
|
void |
close()
Closes any open writers and flushes their data to disk.
|
java.io.BufferedWriter |
getAppendedBufferedWriter()
Get a BufferedWriter to append to the end of this file.
|
java.io.DataOutputStream |
getAppendedDataOutputStream()
Get a DataOutputStream for appending to the end of this file.
|
java.io.BufferedReader |
getBufferedReader()
Get a BufferedReader for this file.
|
java.io.BufferedWriter |
getBufferedWriter()
Get a BufferedWriter to write to this file.
|
byte[] |
getByteArray()
Get the byte[] representing this HecFile's data.
|
byte[] |
getByteArray(boolean compress)
Return a byte[] containing the data from the File.
|
byte[] |
getByteArray(long off,
int len)
Get the byte[] representing this HecFile's data starting at offset for
the length amount.
|
java.io.ByteArrayInputStream |
getByteArrayInputStream()
Get a ByteArrayInputStream for this file.
|
java.io.ByteArrayOutputStream |
getByteArrayOutputStream()
Get a ByteArrayOutputStream for this file.
|
long |
getCheckSum()
Get the check sum for this file.
|
java.io.DataInputStream |
getDataInputStream()
Get a DataInputStream for this file.
|
java.io.DataOutputStream |
getDataOutputStream()
Get a DataOutputStream for writing to this file.
|
EndianInputStream |
getEndianInputStream()
Get an EndianInputStream for this file.
|
EndianOutputStream |
getEndianOutputStream()
Get an EndianOutputStream for this file.
|
java.io.ObjectInputStream |
getObjectInputStream()
Get an ObjectInputStream for this file.
|
java.io.ObjectOutputStream |
getObjectOutputStream()
Get an ObjectOutputStream for this file.
|
boolean |
getUsingCompression()
return whether this
HecFile is using Compression to read/write
data to the RmiFile |
boolean |
isNetworked()
Get whether this HecFile represents a networked or local file.
|
boolean |
lockFile(FileLock fLock)
Lock this file with fLock.
|
void |
notify(java.lang.String message)
Send message to all callback objects registered with this file.
|
boolean |
save()
Save the contents of any writers that are currently in use.
|
boolean |
setByteArray(byte[] byteArray)
Set this HecFile's data to byteArray starting at the beginning of the file
|
void |
setUseCompression(boolean compress)
set whether this
HecFile should use compression to read/write
data to/from the RmiFile |
static void |
setWriteToTmpFile(boolean writeToTmp) |
boolean |
unlockFile(FileLock fLock)
Unlock this file with fLock.
|
void |
writeBytes(long bytePos,
byte[] bytes) |
void |
writeFloat(long bytePos,
float f)
Write a float f to position bytePos in this HecFile.
|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURLpublic SimpleFile(java.io.File parent,
java.lang.String child)
parent - child - public SimpleFile(java.lang.String parent,
java.lang.String child)
public SimpleFile(java.lang.String pathname)
public static void setWriteToTmpFile(boolean writeToTmp)
public boolean appendByteArray(byte[] byteArray)
HecFileappendByteArray in interface HecFilebyteArray - HecFile.appendByteArray(byte[])public void close()
throws java.io.IOException
HecFileclose in interface HecFilejava.io.IOExceptionHecFile.close()public java.io.BufferedWriter getAppendedBufferedWriter()
HecFilegetAppendedBufferedWriter in interface HecFileHecFile.getAppendedBufferedWriter()public java.io.DataOutputStream getAppendedDataOutputStream()
HecFilegetAppendedDataOutputStream in interface HecFileHecFile.getAppendedDataOutputStream()public java.io.BufferedReader getBufferedReader()
HecFilegetBufferedReader in interface HecFileHecFile.getBufferedReader()public java.io.BufferedWriter getBufferedWriter()
HecFilegetBufferedWriter in interface HecFileHecFile.getBufferedWriter()public byte[] getByteArray()
HecFilegetByteArray in interface HecFileHecFile.getByteArray()public byte[] getByteArray(boolean compress)
compress - flag indicating whether to compress the byte[] being returnedpublic byte[] getByteArray(long off,
int len)
HecFilegetByteArray in interface HecFileoff - len - hec.io.HecFile#getByteArray(int, int)public java.io.ByteArrayInputStream getByteArrayInputStream()
HecFilegetByteArrayInputStream in interface HecFileHecFile.getByteArrayInputStream()public java.io.ByteArrayOutputStream getByteArrayOutputStream()
HecFilegetByteArrayOutputStream in interface HecFileHecFile.getByteArrayOutputStream()public long getCheckSum()
HecFilegetCheckSum in interface HecFileHecFile.getCheckSum()public java.io.DataInputStream getDataInputStream()
HecFilegetDataInputStream in interface HecFileHecFile.getDataInputStream()public java.io.DataOutputStream getDataOutputStream()
HecFilegetDataOutputStream in interface HecFileHecFile.getDataOutputStream()public EndianInputStream getEndianInputStream()
HecFilegetEndianInputStream in interface HecFileHecFile.getEndianInputStream()public EndianOutputStream getEndianOutputStream()
HecFilegetEndianOutputStream in interface HecFileHecFile.getEndianOutputStream()public java.io.ObjectInputStream getObjectInputStream()
HecFilegetObjectInputStream in interface HecFileHecFile.getObjectInputStream()public java.io.ObjectOutputStream getObjectOutputStream()
throws java.io.IOException
HecFilegetObjectOutputStream in interface HecFilejava.io.IOExceptionHecFile.getObjectOutputStream()public boolean getUsingCompression()
HecFileHecFile is using Compression to read/write
data to the RmiFilegetUsingCompression in interface HecFileHecFile.getUsingCompression()public boolean isNetworked()
HecFileisNetworked in interface HecFileHecFile.isNetworked()public boolean lockFile(FileLock fLock)
HecFilelockFile in interface HecFilefLock - HecFile.lockFile(hec.io.FileLock)public void notify(java.lang.String message)
HecFilenotify in interface HecFilemessage - HecFile.notify(java.lang.String)public boolean save()
HecFilesave in interface HecFileHecFile.save()public boolean setByteArray(byte[] byteArray)
HecFilesetByteArray in interface HecFilebyteArray - HecFile.setByteArray(byte[])public void setUseCompression(boolean compress)
HecFileHecFile should use compression to read/write
data to/from the RmiFilesetUseCompression in interface HecFilecompress - HecFile.setUseCompression(boolean)public boolean unlockFile(FileLock fLock)
HecFileunlockFile in interface HecFilefLock - HecFile.unlockFile(hec.io.FileLock)public void writeBytes(long bytePos,
byte[] bytes)
writeBytes in interface HecFilepublic void writeFloat(long bytePos,
float f)
HecFilewriteFloat in interface HecFilebytePos - f - HecFile.writeFloat(long, float)