public class SimpleHecFileImpl extends java.io.File implements HecFile
| Constructor and Description |
|---|
SimpleHecFileImpl(java.lang.String path) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
appendByteArray(byte[] byteArray)
Appends byteArray to the end of this file.
|
boolean |
canRead()
Tests whether the application can read the file denoted by this HecFile.
|
boolean |
canWrite()
Tests whether the application can modify the file denoted by this HecFile.
|
void |
close()
Closes any open writers and flushes their data to disk.
|
boolean |
exists()
Tests whether the file denoted by this HecFile exists.
|
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(long off,
int len)
Get the byte[] representing this HecFile's data starting at offset for
the length amount.
|
java.io.ByteArrayInputStream |
getByteArrayInputStream()
Returns a Network Only ByteArrayInputStream for the HecFile.
|
java.io.ByteArrayOutputStream |
getByteArrayOutputStream()
Returns a Network Only ByteArrayOutputStream for the HecFile.
|
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()
Returns an EndianInputStream for the HecFile.
|
EndianOutputStream |
getEndianOutputStream()
Returns an EndianOutputStream for the HecFile.
|
java.lang.String |
getName()
Sets the name of the file.
|
java.io.ObjectInputStream |
getObjectInputStream()
Get an ObjectInputStream for this file.
|
java.io.ObjectOutputStream |
getObjectOutputStream()
Get an ObjectOutputStream for this file.
|
java.lang.String |
getPath()
Converts this HecFile into a pathname String.
|
boolean |
getUsingCompression()
return whether this
HecFile is using Compression to read/write
data to the RmiFile |
boolean |
isFile()
Tests whether the file denoted by this HecFile is a normal file.
|
boolean |
isNetworked()
Get whether this HecFile represents a networked or local file.
|
long |
lastModified()
Returns the time that the file denoted by this HecFile was last modified.
|
long |
length()
Returns the length of the file denoted by this HecFile.
|
boolean |
lockFile(FileLock fLock)
Lock this file with fLock.
|
boolean |
mkdirs()
Creates the directory named by this HecFile, including any necessary but
nonexistent parent directories.
|
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 |
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, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getParent, getParentFile, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isHidden, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURLisDirectorypublic java.lang.String getName()
HecFilepublic java.lang.String getPath()
HecFilepublic boolean canRead()
HecFilepublic boolean isFile()
HecFilepublic boolean exists()
HecFilepublic boolean canWrite()
HecFilepublic boolean mkdirs()
HecFilepublic long length()
HecFilepublic long lastModified()
HecFilelastModified in interface HecFilelastModified in class java.io.Filepublic byte[] getByteArray()
HecFilegetByteArray in interface HecFilepublic byte[] getByteArray(long off,
int len)
HecFilegetByteArray in interface HecFilepublic boolean setByteArray(byte[] byteArray)
HecFilesetByteArray in interface HecFilebyteArray - the file's new datapublic boolean appendByteArray(byte[] byteArray)
HecFileappendByteArray in interface HecFilebyteArray - the bytes to append to the end of this file.public java.io.BufferedWriter getBufferedWriter()
HecFilegetBufferedWriter in interface HecFilepublic java.io.BufferedWriter getAppendedBufferedWriter()
HecFilegetAppendedBufferedWriter in interface HecFilepublic java.io.DataOutputStream getDataOutputStream()
HecFilegetDataOutputStream in interface HecFilepublic java.io.DataOutputStream getAppendedDataOutputStream()
HecFilegetAppendedDataOutputStream in interface HecFilepublic java.io.DataInputStream getDataInputStream()
HecFilegetDataInputStream in interface HecFilepublic java.io.ObjectOutputStream getObjectOutputStream()
throws java.io.IOException
HecFilegetObjectOutputStream in interface HecFilejava.io.IOExceptionpublic java.io.ObjectInputStream getObjectInputStream()
HecFilegetObjectInputStream in interface HecFilepublic java.io.ByteArrayOutputStream getByteArrayOutputStream()
getByteArrayOutputStream in interface HecFilepublic java.io.ByteArrayInputStream getByteArrayInputStream()
getByteArrayInputStream in interface HecFilepublic EndianInputStream getEndianInputStream()
getEndianInputStream in interface HecFilepublic EndianOutputStream getEndianOutputStream()
getEndianOutputStream in interface HecFilepublic boolean save()
HecFilepublic java.io.BufferedReader getBufferedReader()
HecFilegetBufferedReader in interface HecFilepublic void notify(java.lang.String message)
HecFilepublic void close()
throws java.io.IOException
HecFilepublic long getCheckSum()
HecFilegetCheckSum in interface HecFileCRC32public boolean isNetworked()
HecFileisNetworked in interface HecFilepublic boolean lockFile(FileLock fLock)
HecFilepublic boolean unlockFile(FileLock fLock)
HecFileunlockFile in interface HecFilefLock - The type of FileLock to use to unlock this HecFile.public void setUseCompression(boolean compress)
HecFileHecFile should use compression to read/write
data to/from the RmiFilesetUseCompression in interface HecFilecompress - whether to use compression or notRmiFile#setByteArray,
RmiFile#appendByteArray,
RmiFile#getByteArraypublic boolean getUsingCompression()
HecFileHecFile is using Compression to read/write
data to the RmiFilegetUsingCompression in interface HecFileRmiFile#setByteArray,
RmiFile#appendByteArray,
RmiFile#getByteArraypublic void writeFloat(long bytePos,
float f)
HecFilewriteFloat in interface HecFilebytePos - The position in the file to write f.f - The float to write.public void writeBytes(long bytePos,
byte[] bytes)
writeBytes in interface HecFile