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
AxionException
public boolean createNewFile(java.io.File file) throws AxionException
AxionException
public java.io.ObjectOutputStream createObjectOutputSteam(java.io.File file) throws java.io.IOException
java.io.IOException
public java.io.DataOutputStream createDataOutputSteam(java.io.File file) throws java.io.IOException
java.io.IOException
public AxionFileSystem.PidxList newPidxList(int count, java.io.File file, boolean readonly) throws AxionException
AxionException
public AxionInputStream open(java.io.File file) throws java.io.IOException
java.io.IOException
public AxionOutputStream open(java.io.File file, boolean overwrite) throws java.io.IOException
java.io.IOException
public AxionOutputStream openAppend(java.io.File file) throws java.io.IOException
java.io.IOException
public BufferedDataInputStream openBufferedDIS(java.io.File file) throws AxionException
AxionException
public BufferedDataOutputStream openBufferedDOS(java.io.File file, long startPos) throws AxionException
AxionException
public BufferedDataOutputStream openBufferedDOSAppend(java.io.File file, int bufferSize) throws AxionException
AxionException
public java.io.ObjectInputStream openObjectInputSteam(java.io.File file) throws java.io.IOException
java.io.IOException
public java.io.DataInputStream openDataInputSteam(java.io.File file) throws java.io.IOException
java.io.IOException
public org.apache.commons.collections.primitives.IntList parseIntFile(java.io.File file) throws AxionException
file
- the File
to read fromAxionException
public AxionFileSystem.PidxList parseLongPidx(java.io.File file, boolean readOnly) throws AxionException
file
- the File
to read fromAxionException
public AxionFileSystem.PidxList parseUnsignedIntPidx(java.io.File file, boolean readOnly) throws AxionException
AxionException
public void readAll(java.io.File file, byte[] rawdata) throws AxionException
AxionException
public void writeIntFile(java.io.File file, org.apache.commons.collections.primitives.IntList list) throws AxionException
file
- the File
to write toAxionException
public void writeUnsignedInt(BufferedDataOutputStream out, long offset, int value) throws AxionException
raf
- the File
to append tooffset
- the pidx file offset to writevalue
- data file pointer for a given pidx offsetAxionException
public void writeUnsignedIntFile(java.io.File file, org.apache.commons.collections.primitives.LongList list) throws AxionException
file
- the File
to write toAxionException