public class SimpleEscape extends Object implements Escape
| Modifier and Type | Field and Description |
|---|---|
static byte |
COMMIT |
static byte |
DATA |
static byte |
DROP |
static byte |
NEW |
| Constructor and Description |
|---|
SimpleEscape(String filename,
boolean append)
Creates a new instance of SimpleEscape
|
| Modifier and Type | Method and Description |
|---|---|
void |
commit(long handle)
The previous blocks saved by
Escape.save(long, java.lang.String, java.lang.String, java.nio.ByteBuffer) method should be commited. |
void |
drop(long handle)
The previous blocks saved by
Escape.save(long, java.lang.String, java.lang.String, java.nio.ByteBuffer) method should be forgotten. |
long |
save(long handle,
ByteBuffer buf)
Save the consequent buffer related to a stream of the key.
|
long |
save(long id,
String key,
String contentType,
ByteBuffer buf)
Save the very first buffer related to a stream of the key.
|
void |
shutdown()
Closes (shuts down) this interface.
|
public static final byte COMMIT
public static final byte DROP
public static final byte DATA
public static final byte NEW
public SimpleEscape(String filename, boolean append) throws IOException
IOExceptionpublic long save(long id,
String key,
String contentType,
ByteBuffer buf)
throws IOException
Escapesave in interface EscapeIOExceptionpublic long save(long handle,
ByteBuffer buf)
throws IOException
Escapesave in interface EscapeIOExceptionpublic void drop(long handle)
throws IOException
EscapeEscape.save(long, java.lang.String, java.lang.String, java.nio.ByteBuffer) method should be forgotten.drop in interface EscapeIOExceptionpublic void commit(long handle)
throws IOException
EscapeEscape.save(long, java.lang.String, java.lang.String, java.nio.ByteBuffer) method should be commited.commit in interface EscapeIOExceptionCopyright © 2016 Egothor. All Rights Reserved.