public class AxionFileSystem
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
AxionFileSystem.PidxList |
| Constructor and Description |
|---|
AxionFileSystem() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeInputStream(java.io.InputStream in) |
void |
closeOutputStream(java.io.OutputStream out) |
BufferedDataOutputStream |
createBufferedDOS(java.io.File file)
create a new file and wrap wrap the stream with BufferedDataOutputStream which
improves perfermance significantly.
|
java.io.DataOutputStream |
createDataOutputSteam(java.io.File file) |
boolean |
createNewFile(java.io.File file) |
java.io.ObjectOutputStream |
createObjectOutputSteam(java.io.File file) |
AxionFileSystem.PidxList |
newPidxList(int count,
java.io.File file,
boolean readonly) |
AxionInputStream |
open(java.io.File file)
Open the file in read only mode.
|
AxionOutputStream |
open(java.io.File file,
boolean overwrite)
Open file in append mode if overwrite is false, otherwise create new file.
|
AxionOutputStream |
openAppend(java.io.File file)
Open file in append mode, position will be set to the end of file.
|
BufferedDataInputStream |
openBufferedDIS(java.io.File file)
Open file in read only mode, position will be set to 0.
|
BufferedDataOutputStream |
openBufferedDOS(java.io.File file,
long startPos)
Open a outputsteam and points the file pointer to a given start position in the
file.
|
BufferedDataOutputStream |
openBufferedDOSAppend(java.io.File file,
int bufferSize)
Open file in append mode, position will be set to the end of file.
|
java.io.DataInputStream |
openDataInputSteam(java.io.File file) |
java.io.ObjectInputStream |
openObjectInputSteam(java.io.File file) |
org.apache.commons.collections.primitives.IntList |
parseIntFile(java.io.File file)
Reads a list of int values from a file.
|
AxionFileSystem.PidxList |
parseLongPidx(java.io.File file,
boolean readOnly)
Reads a list of long values from a file.
|
AxionFileSystem.PidxList |
parseUnsignedIntPidx(java.io.File file,
boolean readOnly) |
void |
readAll(java.io.File file,
byte[] rawdata) |
void |
writeIntFile(java.io.File file,
org.apache.commons.collections.primitives.IntList list)
Writes a list of int values to a file.
|
void |
writeUnsignedInt(BufferedDataOutputStream out,
long offset,
int value)
Updates an UnsignedInt value to a file.
|
void |
writeUnsignedIntFile(java.io.File file,
org.apache.commons.collections.primitives.LongList list)
Writes a list of long values to a file.
|
public void closeInputStream(java.io.InputStream in)
public void closeOutputStream(java.io.OutputStream out)
public BufferedDataOutputStream createBufferedDOS(java.io.File file) throws AxionException
AxionExceptionpublic boolean createNewFile(java.io.File file)
throws AxionException
AxionExceptionpublic java.io.ObjectOutputStream createObjectOutputSteam(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic java.io.DataOutputStream createDataOutputSteam(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic AxionFileSystem.PidxList newPidxList(int count, java.io.File file, boolean readonly) throws AxionException
AxionExceptionpublic AxionInputStream open(java.io.File file) throws java.io.IOException
java.io.IOExceptionpublic AxionOutputStream open(java.io.File file, boolean overwrite) throws java.io.IOException
java.io.IOExceptionpublic AxionOutputStream openAppend(java.io.File file) throws java.io.IOException
java.io.IOExceptionpublic BufferedDataInputStream openBufferedDIS(java.io.File file) throws AxionException
AxionExceptionpublic BufferedDataOutputStream openBufferedDOS(java.io.File file, long startPos) throws AxionException
AxionExceptionpublic BufferedDataOutputStream openBufferedDOSAppend(java.io.File file, int bufferSize) throws AxionException
AxionExceptionpublic java.io.ObjectInputStream openObjectInputSteam(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic java.io.DataInputStream openDataInputSteam(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic org.apache.commons.collections.primitives.IntList parseIntFile(java.io.File file)
throws AxionException
file - the Fileto read fromAxionExceptionpublic AxionFileSystem.PidxList parseLongPidx(java.io.File file, boolean readOnly) throws AxionException
file - the Fileto read fromAxionExceptionpublic AxionFileSystem.PidxList parseUnsignedIntPidx(java.io.File file, boolean readOnly) throws AxionException
AxionExceptionpublic void readAll(java.io.File file,
byte[] rawdata)
throws AxionException
AxionExceptionpublic void writeIntFile(java.io.File file,
org.apache.commons.collections.primitives.IntList list)
throws AxionException
file - the Fileto write toAxionExceptionpublic void writeUnsignedInt(BufferedDataOutputStream out, long offset, int value) throws AxionException
raf - the Fileto append tooffset - the pidx file offset to writevalue - data file pointer for a given pidx offsetAxionExceptionpublic void writeUnsignedIntFile(java.io.File file,
org.apache.commons.collections.primitives.LongList list)
throws AxionException
file - the Fileto write toAxionException