本文整理汇总了Java中com.hazelcast.nio.ObjectDataOutput.writeByteArray方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectDataOutput.writeByteArray方法的具体用法?Java ObjectDataOutput.writeByteArray怎么用?Java ObjectDataOutput.writeByteArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.hazelcast.nio.ObjectDataOutput
的用法示例。
在下文中一共展示了ObjectDataOutput.writeByteArray方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeInt(id);
out.writeUTF(topicName);
out.writeUTF(publisherId);
out.writeByteArray(message);
out.writeInt(qos != null ? qos.value() : Byte.MIN_VALUE);
out.writeBoolean(isRetain);
}
示例2: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public final void writeData(ObjectDataOutput out) throws IOException {
out.writeUTF(getCorrelationId());
out.writeLong(getGenTimestamp());
out.writeUTF(getHeader());
out.writeByteArray(bytes);
}
示例3: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeUTF(getFileName());
out.writeLong(getFileSize());
out.writeLong(getCreationTime());
out.writeLong(getLastAccessTime());
out.writeLong(getLastModifiedTime());
out.writeInt(getSize());
out.writeInt(getOffset());
out.writeByteArray(getChunk());
}
示例4: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException
{
out.writeLong(id);
out.writeUTF(topic);
out.writeUTF(type);
out.writeLong(timestamp);
out.writeByteArray(payload);
doWriteData(out);
}
示例5: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
InternalSerializationService ss = getSerializationService();
ObjectDataOutput tmp = ss.createObjectDataOutput();
super.writeData(tmp);
out.writeByteArray(IOUtil.compress(tmp.toByteArray()));
}
示例6: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
InternalSerializationService ss = getSerializationService();
ObjectDataOutput tmp = ss.createObjectDataOutput();
super.writeData(tmp);
byte[] data = tmp.toByteArray();
byte[] data2 = IOUtil.compress(data);
//logger.info("writeData; original size: {}; compressed size: {}", data.length, data2.length);
out.writeByteArray(data2);
}
示例7: write
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void write(ObjectDataOutput out, T object) throws IOException {
out.writeByteArray(get().writeValueAsBytes(object));
}
示例8: write
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void write(ObjectDataOutput out, Object object) throws IOException {
out.writeByteArray(objectMapper.writeValueAsBytes(object));
}
示例9: writeCompressedData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
public static void writeCompressedData(InternalSerializationService ss, ObjectDataOutput out, Object data) throws IOException {
ObjectDataOutput tmp = ss.createObjectDataOutput();
tmp.writeObject(data);
out.writeByteArray(IOUtil.compress(tmp.toByteArray()));
}
示例10: writeCompressedContent
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
public static void writeCompressedContent(InternalSerializationService ss, ObjectDataOutput out, ContentSerializer<Object> cs, Object data) throws IOException {
ObjectDataOutput tmp = ss.createObjectDataOutput();
cs.writeContent(tmp, data);
out.writeByteArray(IOUtil.compress(tmp.toByteArray()));
}
示例11: writeData
import com.hazelcast.nio.ObjectDataOutput; //导入方法依赖的package包/类
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeByteArray(this.bytes);
}