public class SourceData
extends java.lang.Object
BuffersInputStream
. Will usually be
subclassed.Modifier and Type | Class and Description |
---|---|
static interface |
SourceData.Handler
Handler for SourceDatas.
|
Modifier and Type | Field and Description |
---|---|
protected java.nio.ByteBuffer |
buffer |
protected int[] |
columnNumbers |
protected int |
position |
protected int |
size |
Modifier | Constructor and Description |
---|---|
|
SourceData()
Construct an unmanaged SourceData.
|
protected |
SourceData(SourceDataFactory<?> factory,
int[] columnNumbers)
Construct a SourceData.
|
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
getBuffer()
Get the buffer associated with this SourceData.
|
SourceDataFactory<?> |
getFactory()
Get the factory that created this.
|
boolean |
isEndOfMessage()
Is this the known end of a message? Override for sources that return
messages using more than one buffer.
|
boolean |
isStartOfMessage()
Is this the start of a new message? Override for sources that return
messages using more than one buffer.
|
java.lang.String |
locationDescription()
Should give a description of the source that this buffer comes from.
|
void |
resetBeforeFree()
Clear any resources associated with this SourceData.
|
void |
setBuffer(java.nio.ByteBuffer buffer)
Sets the buffer associated with this SourceData.
|
void |
updateLocation(RowInserter inserter)
Update any requested metadata into RowInserter.
|
protected java.nio.ByteBuffer buffer
protected int position
protected int size
protected final int[] columnNumbers
protected SourceData(SourceDataFactory<?> factory, int[] columnNumbers)
factory
- factory to be returned to on freeingcolumnNumbers
- columnNumbers of metadata columns or -1 for columns to ignorepublic SourceData()
public SourceDataFactory<?> getFactory()
public java.lang.String locationDescription()
public void updateLocation(RowInserter inserter) throws java.sql.SQLException
inserter
- RowInserter to insert into.java.sql.SQLException
- when an unhandled error occurspublic java.nio.ByteBuffer getBuffer()
public void setBuffer(java.nio.ByteBuffer buffer)
buffer
- buffer to setpublic boolean isStartOfMessage()
public boolean isEndOfMessage()
public void resetBeforeFree()
Copyright (C) 2003-2021 SQLstream, Inc.