org.xerial.mlpress
Class MemoryBlock

java.lang.Object
  extended by org.xerial.mlpress.MemoryBlock

public class MemoryBlock
extends Object

The byte size of MemoryBlock dinamically expands from 256 to 512, 1024, 2048, 4096, 8192, 16384, 32768 and 65536.

Author:
leo

Constructor Summary
MemoryBlock(int id, MemoryBlockManager manager)
           
 
Method Summary
 int getID()
           
 void resize()
           
 int size()
           
 void write(byte[] data, int offset, int len)
           
 void write(int byteValue)
           
 void writeTo(OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryBlock

public MemoryBlock(int id,
                   MemoryBlockManager manager)
Method Detail

size

public int size()

getID

public int getID()

write

public void write(int byteValue)

write

public void write(byte[] data,
                  int offset,
                  int len)

writeTo

public void writeTo(OutputStream out)
             throws IOException
Throws:
IOException

resize

public void resize()


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.