2003-10-13 Michael Koch <konqueror@gmx.de>
* java/nio/Buffer.java (hasRemaining): Made implementation more clear. * java/nio/MappedByteBuffer.java (loaded): New member variable. (force): Added comment. (isLoaded): Return value of loaded. (load): Set loaded to true, added comment. From-SVN: r72418
This commit is contained in:
parent
bc9b32c230
commit
1adef66864
3 changed files with 18 additions and 3 deletions
|
@ -44,6 +44,8 @@ package java.nio;
|
|||
*/
|
||||
public abstract class MappedByteBuffer extends ByteBuffer
|
||||
{
|
||||
private boolean loaded = false;
|
||||
|
||||
MappedByteBuffer (int capacity, int limit, int position, int mark)
|
||||
{
|
||||
super (capacity, limit, position, mark);
|
||||
|
@ -51,16 +53,19 @@ public abstract class MappedByteBuffer extends ByteBuffer
|
|||
|
||||
public final MappedByteBuffer force ()
|
||||
{
|
||||
// FIXME: Flush to disk here.
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isLoaded ()
|
||||
{
|
||||
return true;
|
||||
return loaded;
|
||||
}
|
||||
|
||||
public final MappedByteBuffer load ()
|
||||
{
|
||||
// FIXME: Try to load all pages into memory.
|
||||
loaded = true;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue