本文整理汇总了Java中org.hsqldb.SessionInterface.getStreamBlockSize方法的典型用法代码示例。如果您正苦于以下问题:Java SessionInterface.getStreamBlockSize方法的具体用法?Java SessionInterface.getStreamBlockSize怎么用?Java SessionInterface.getStreamBlockSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.SessionInterface
的用法示例。
在下文中一共展示了SessionInterface.getStreamBlockSize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ClobInputStream
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public ClobInputStream(SessionInterface session, ClobData clob,
long offset, long length) {
final long clobLength = clob.length(session);
this.session = session;
this.clob = clob;
this.availableLength = offset + Math.min(length, clobLength - offset);
this.currentPosition = offset;
this.streamBlockSize = session.getStreamBlockSize();
}
示例2: BlobInputStream
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
public BlobInputStream(SessionInterface session, BlobData blob,
long offset, long length) {
final long blobLength = blob.length(session);
this.session = session;
this.blob = blob;
this.availableLength = offset + Math.min(length, blobLength - offset);
this.currentPosition = offset;
this.streamBlockSize = session.getStreamBlockSize();
}
示例3: writeCreateByteSegments
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
private void writeCreateByteSegments(SessionInterface session,
DataOutputStream dataOut)
throws IOException {
//
int bufferLength = session.getStreamBlockSize();
long currentOffset = blockOffset;
dataOut.writeByte(mode);
dataOut.writeInt(databaseID);
dataOut.writeLong(sessionID);
dataOut.writeLong(lobID);
dataOut.writeInt(subType);
HsqlByteArrayOutputStream byteArrayOS =
new HsqlByteArrayOutputStream(bufferLength);
byteArrayOS.reset();
byteArrayOS.write(stream, bufferLength);
dataOut.writeLong(currentOffset);
dataOut.writeLong(byteArrayOS.size());
dataOut.write(byteArrayOS.getBuffer(), 0, byteArrayOS.size());
currentOffset += byteArrayOS.size();
if (byteArrayOS.size() < bufferLength) {
return;
}
//
while (true) {
byteArrayOS.reset();
byteArrayOS.write(stream, bufferLength);
if (byteArrayOS.size() == 0) {
break;
}
//
dataOut.writeByte(mode);
dataOut.writeInt(databaseID);
dataOut.writeLong(sessionID);
dataOut.writeLong(lobID);
dataOut.writeInt(LobResultTypes.REQUEST_SET_BYTES);
dataOut.writeLong(currentOffset);
dataOut.writeLong(byteArrayOS.size());
dataOut.write(byteArrayOS.getBuffer(), 0, byteArrayOS.size());
currentOffset += byteArrayOS.size();
if (byteArrayOS.size() < bufferLength) {
break;
}
}
}
示例4: writeCreateCharSegments
import org.hsqldb.SessionInterface; //导入方法依赖的package包/类
private void writeCreateCharSegments(SessionInterface session,
DataOutputStream dataOut)
throws IOException {
//
int bufferLength = session.getStreamBlockSize();
long currentOffset = blockOffset;
dataOut.writeByte(mode);
dataOut.writeInt(databaseID);
dataOut.writeLong(sessionID);
dataOut.writeLong(lobID);
dataOut.writeInt(subType);
HsqlByteArrayOutputStream byteArrayOS =
new HsqlByteArrayOutputStream(bufferLength);
byteArrayOS.reset();
byteArrayOS.write(reader, bufferLength / 2);
//
dataOut.writeLong(currentOffset);
dataOut.writeLong(byteArrayOS.size() / 2);
dataOut.write(byteArrayOS.getBuffer(), 0, byteArrayOS.size());
currentOffset += byteArrayOS.size() / 2;
if (byteArrayOS.size() < bufferLength) {
return;
}
//
while (true) {
byteArrayOS.reset();
byteArrayOS.write(reader, bufferLength / 2);
if (byteArrayOS.size() == 0) {
break;
}
//
dataOut.writeByte(mode);
dataOut.writeInt(databaseID);
dataOut.writeLong(sessionID);
dataOut.writeLong(lobID);
dataOut.writeInt(LobResultTypes.REQUEST_SET_CHARS);
dataOut.writeLong(currentOffset);
dataOut.writeLong(byteArrayOS.size() / 2);
dataOut.write(byteArrayOS.getBuffer(), 0, byteArrayOS.size());
currentOffset += byteArrayOS.size() / 2;
if (byteArrayOS.size() < bufferLength) {
break;
}
}
}