public interface CodecHandler
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDecodeInline()
Returns
true if this handler can decode a page inline,
false otherwise. |
boolean |
canEncodePartialPage()
Returns
true if this handler can encode partial pages,
false otherwise. |
void |
decodePage(ByteBuffer inPage,
ByteBuffer outPage,
int pageNumber)
Decodes the given page buffer.
|
ByteBuffer |
encodePage(ByteBuffer page,
int pageNumber,
int pageOffset)
Encodes the given page buffer into a new page buffer and returns it.
|
boolean canEncodePartialPage()
true if this handler can encode partial pages,
false otherwise. If this method returns false, the
encodePage(java.nio.ByteBuffer, int, int) method will never be called with a non-zero
pageOffset.boolean canDecodeInline()
true if this handler can decode a page inline,
false otherwise. If this method returns false, the
decodePage(java.nio.ByteBuffer, java.nio.ByteBuffer, int) method will always be called with separate buffers.void decodePage(ByteBuffer inPage, ByteBuffer outPage, int pageNumber) throws IOException
inPage - the page to be decodedoutPage - the decoded page. if canDecodeInline() is true, this will be the same buffer as inPage.pageNumber - the page number of the given pageIOException - if an exception occurs during decodingByteBuffer encodePage(ByteBuffer page, int pageNumber, int pageOffset) throws IOException
page - the page to be encoded, should not be modifiedpageNumber - the page number of the given pagepageOffset - offset within the page at which to start writing the
page dataIOException - if an exception occurs during decodingCopyright © 2005–2025 OpenHMS. All rights reserved.