本文整理汇总了Java中org.hsqldb.lib.DataOutputStream.flush方法的典型用法代码示例。如果您正苦于以下问题:Java DataOutputStream.flush方法的具体用法?Java DataOutputStream.flush怎么用?Java DataOutputStream.flush使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.lib.DataOutputStream
的用法示例。
在下文中一共展示了DataOutputStream.flush方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: write
import org.hsqldb.lib.DataOutputStream; //导入方法依赖的package包/类
protected void write(Result r) throws IOException, HsqlException {
HsqlByteArrayOutputStream memStream = new HsqlByteArrayOutputStream();
DataOutputStream tempOutput = new DataOutputStream(memStream);
r.write(this, tempOutput, rowOut);
httpConnection.setRequestMethod("POST");
httpConnection.setDoOutput(true);
httpConnection.setUseCaches(false);
//httpConnection.setRequestProperty("Accept-Encoding", "gzip");
httpConnection.setRequestProperty("Content-Type",
"application/octet-stream");
httpConnection.setRequestProperty("Content-Length",
String.valueOf(IDLENGTH
+ memStream.size()));
dataOutput = new DataOutputStream(httpConnection.getOutputStream());
dataOutput.writeInt(r.getDatabaseId());
dataOutput.writeLong(r.getSessionId());
memStream.writeTo(dataOutput);
dataOutput.flush();
}
示例2: xmit
import org.hsqldb.lib.DataOutputStream; //导入方法依赖的package包/类
/**
* @return packet size (which does not count the type byte).
*/
synchronized int xmit(char packetType,
DataOutputStream destinationStream)
throws IOException {
byte[] ba = byteArrayOutputStream.toByteArray();
ba[0] = (byte) (ba.length >> 24);
ba[1] = (byte) (ba.length >> 16);
ba[2] = (byte) (ba.length >> 8);
ba[3] = (byte) ba.length;
reset();
destinationStream.writeByte(packetType);
destinationStream.write(ba);
destinationStream.flush();
return ba.length;
}
示例3: write
import org.hsqldb.lib.DataOutputStream; //导入方法依赖的package包/类
public void write(SessionInterface session, DataOutputStream dataOut,
RowOutputInterface rowOut) throws IOException {
writeBody(session, dataOut);
dataOut.writeByte(ResultConstants.NONE);
dataOut.flush();
}
示例4: writeSingleColumnResult
import org.hsqldb.lib.DataOutputStream; //导入方法依赖的package包/类
protected void writeSingleColumnResult(Result r) throws IOException {
DataOutputStream dataOutput = new DataOutputStream(fileStreamOut);
rowOut.reset();
r.write(dataOutput, rowOut);
dataOutput.flush();
}
示例5: write
import org.hsqldb.lib.DataOutputStream; //导入方法依赖的package包/类
public void write(DataOutputStream dataOut,
RowOutputInterface rowOut)
throws IOException {
writeBody(dataOut);
dataOut.writeByte(ResultConstants.NONE);
dataOut.flush();
}