|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.xmlstore.io.MemoryFileSystem
public class MemoryFileSystem
| Constructor Summary | |
|---|---|
MemoryFileSystem()
|
|
MemoryFileSystem(int capacity)
|
|
MemoryFileSystem(int capacity,
FileSystemIdentifier fsi)
|
|
| Method Summary | |
|---|---|
LocalLocator |
all()
Returns a LocalLocator to all content currently in this
FileSystem. |
LocalLocator |
allocate()
Always succeeds and allocates space at end of buffer, writes must be done before the next allocation. |
LocalLocator |
allocate(int size)
|
LocalLocator |
allocate(int size,
FileSystemIdentifier id)
|
void |
clear()
Frees all data and generates a new FileSystemIdentifier. |
void |
clear(FileSystemIdentifier fsi)
Frees all data and sets the FileSystemIdentifier to
the specified object. |
void |
close()
No effect. |
void |
copy(FileSystem fs,
LocalLocator fromLoc,
LocalLocator locTo)
Copies the data at fromLoc in the specified
FileSystem to toLoc in this
FileSystem. |
FileSystemIdentifier |
currentIdentifier()
|
void |
free(LocalLocator loc)
Does nothing. |
DataInput |
getInput(LocalLocator l)
Positions the input at the specified location and returns a DataInput for reading. |
DataOutput |
getOutput(LocalLocator l)
Only append allowed. |
boolean |
isContained(LocalLocator l)
Returns true if the specified LocalLocator
originates from this FileSystem. |
long |
size()
Returns the size of the FileSystem. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemoryFileSystem()
public MemoryFileSystem(int capacity)
public MemoryFileSystem(int capacity,
FileSystemIdentifier fsi)
| Method Detail |
|---|
public FileSystemIdentifier currentIdentifier()
currentIdentifier in interface FileSystem
public LocalLocator allocate()
throws IOException
allocate in interface FileSystemIOException
public LocalLocator allocate(int size)
throws IOException
allocate in interface FileSystemIOException
public LocalLocator allocate(int size,
FileSystemIdentifier id)
throws IOException
allocate in interface FileSystemIOExceptionpublic LocalLocator all()
FileSystemLocalLocator to all content currently in this
FileSystem.
all in interface FileSystem
public void free(LocalLocator loc)
throws IOException,
UnknownLocatorException
free in interface FileSystemIOException
UnknownLocatorExceptionpublic void clear()
FileSystemIdentifier.
public void clear(FileSystemIdentifier fsi)
FileSystemIdentifier to
the specified object.
public DataInput getInput(LocalLocator l)
throws IOException,
UnknownLocatorException
FileSystemDataInput for reading. The DataInput is
shared so if multiple threads operate on the same
FileSystem concurrently, external synchronization should
be used.
getInput in interface FileSystemIOException
UnknownLocatorException
public DataOutput getOutput(LocalLocator l)
throws IOException,
UnknownLocatorException
getOutput in interface FileSystemIOException
UnknownLocatorException
public void copy(FileSystem fs,
LocalLocator fromLoc,
LocalLocator locTo)
throws IOException,
UnknownLocatorException
FileSystemfromLoc in the specified
FileSystem to toLoc in this
FileSystem.
copy in interface FileSystemIOException
UnknownLocatorException
public long size()
throws IOException
FileSystemFileSystem.
size in interface FileSystemIOException
public void close()
throws IOException
close in interface FileSystemIOExceptionpublic boolean isContained(LocalLocator l)
FileSystemtrue if the specified LocalLocator
originates from this FileSystem.
isContained in interface FileSystem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||