本文整理了Java中com.couchbase.client.deps.io.netty.buffer.ByteBuf.alloc()
方法的一些代码示例,展示了ByteBuf.alloc()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ByteBuf.alloc()
方法的具体详情如下:
包路径:com.couchbase.client.deps.io.netty.buffer.ByteBuf
类名称:ByteBuf
方法名:alloc
[英]Returns the ByteBufAllocator which created this buffer.
[中]返回创建此缓冲区的ByteBufAllocator。
代码示例来源:origin: com.couchbase.client/core-io
@Override
public ByteBufAllocator alloc() {
return buf.alloc();
}
代码示例来源:origin: com.couchbase.client/core-io
@Override
public final ByteBufAllocator alloc() {
return buf.alloc();
}
代码示例来源:origin: com.couchbase.client/core-io
@Override
public ByteBufAllocator alloc() {
return buffer.alloc();
}
代码示例来源:origin: couchbase/couchbase-jvm-core
@Override
public ByteBufAllocator alloc() {
return buffer.alloc();
}
代码示例来源:origin: couchbase/couchbase-jvm-core
@Override
public ByteBufAllocator alloc() {
return buf.alloc();
}
代码示例来源:origin: couchbase/couchbase-jvm-core
@Override
public final ByteBufAllocator alloc() {
return buf.alloc();
}
代码示例来源:origin: com.couchbase.client/core-io
public static ByteBuf encode(
ByteBuf src, int off, int len, boolean breakLines, Base64Dialect dialect) {
return encode(src, off, len, breakLines, dialect, src.alloc());
}
代码示例来源:origin: com.couchbase.client/core-io
@Override
public ByteBufAllocator alloc() {
return unwrap().alloc();
}
代码示例来源:origin: com.couchbase.client/core-io
public static ByteBuf decode(
ByteBuf src, int off, int len, Base64Dialect dialect) {
return decode(src, off, len, dialect, src.alloc());
}
代码示例来源:origin: com.couchbase.client/core-io
@Override
public ByteBufAllocator alloc() {
return unwrap().alloc();
}
代码示例来源:origin: couchbase/couchbase-jvm-core
@Override
public ByteBufAllocator alloc() {
return unwrap().alloc();
}
代码示例来源:origin: couchbase/couchbase-jvm-core
public static ByteBuf decode(
ByteBuf src, int off, int len, Base64Dialect dialect) {
return decode(src, off, len, dialect, src.alloc());
}
代码示例来源:origin: com.couchbase.client/core-io
@Override
public ByteBufAllocator alloc() {
return unwrap().alloc();
}
代码示例来源:origin: couchbase/couchbase-jvm-core
public static ByteBuf encode(
ByteBuf src, int off, int len, boolean breakLines, Base64Dialect dialect) {
return encode(src, off, len, breakLines, dialect, src.alloc());
}
代码示例来源:origin: couchbase/couchbase-jvm-core
@Override
public ByteBufAllocator alloc() {
return unwrap().alloc();
}
代码示例来源:origin: couchbase/couchbase-jvm-core
@Override
public ByteBufAllocator alloc() {
return unwrap().alloc();
}
代码示例来源:origin: couchbase/java-dcp-client
public static byte[] getContentAsByteArray(ByteBuf buffer) {
final ByteBuf content = getContent(buffer);
if (isSnappyCompressed(buffer)) {
// Avoid a memory copy by stealing the decompressed buffer's backing array.
if (!(content.alloc() instanceof UnpooledByteBufAllocator)) {
throw new RuntimeException("Expected decompressed content buffer to be unpooled.");
}
if (content.array().length != content.readableBytes()) {
throw new RuntimeException("Expected decompressed content buffer to be backed by array of exact size.");
}
return content.array();
}
byte[] bytes = new byte[content.readableBytes()];
content.getBytes(0, bytes);
return bytes;
}
代码示例来源:origin: com.couchbase.client/core-io
decoder.decode(buf.nioBuffer(index, length));
} else {
ByteBuf heapBuffer = buf.alloc().heapBuffer(length);
try {
heapBuffer.writeBytes(buf, index, length);
代码示例来源:origin: couchbase/couchbase-jvm-core
ByteBuf buffer = src.alloc().heapBuffer(len);
try {
buffer.writeBytes(src, readerIndex, len);
代码示例来源:origin: com.couchbase.client/core-io
ByteBuf buffer = src.alloc().heapBuffer(len);
try {
buffer.writeBytes(src, readerIndex, len);
内容来源于网络,如有侵权,请联系作者删除!