本文整理了Java中io.netty.handler.codec.base64.Base64.encode()
方法的一些代码示例,展示了Base64.encode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Base64.encode()
方法的具体详情如下:
包路径:io.netty.handler.codec.base64.Base64
类名称:Base64
方法名:encode
暂无
代码示例来源:origin: netty/netty
public static ByteBuf encode(
ByteBuf src, int off, int len, boolean breakLines) {
return encode(src, off, len, breakLines, Base64Dialect.STANDARD);
}
代码示例来源:origin: netty/netty
public static ByteBuf encode(ByteBuf src) {
return encode(src, Base64Dialect.STANDARD);
}
代码示例来源:origin: netty/netty
public static ByteBuf encode(ByteBuf src, boolean breakLines) {
return encode(src, breakLines, Base64Dialect.STANDARD);
}
代码示例来源:origin: netty/netty
public static ByteBuf encode(ByteBuf src, int off, int len) {
return encode(src, off, len, Base64Dialect.STANDARD);
}
代码示例来源:origin: redisson/redisson
public static ByteBuf encode(
ByteBuf src, int off, int len, boolean breakLines) {
return encode(src, off, len, breakLines, Base64Dialect.STANDARD);
}
代码示例来源:origin: redisson/redisson
public static ByteBuf encode(ByteBuf src, boolean breakLines) {
return encode(src, breakLines, Base64Dialect.STANDARD);
}
代码示例来源:origin: redisson/redisson
public static ByteBuf encode(ByteBuf src) {
return encode(src, Base64Dialect.STANDARD);
}
代码示例来源:origin: redisson/redisson
public static ByteBuf encode(ByteBuf src, int off, int len) {
return encode(src, off, len, Base64Dialect.STANDARD);
}
代码示例来源:origin: netty/netty
@Override
protected void encode(ChannelHandlerContext ctx, ByteBuf msg, List<Object> out) throws Exception {
out.add(Base64.encode(msg, msg.readerIndex(), msg.readableBytes(), breakLines, dialect));
}
}
代码示例来源:origin: netty/netty
public static ByteBuf encode(ByteBuf src, boolean breakLines, Base64Dialect dialect) {
if (src == null) {
throw new NullPointerException("src");
}
ByteBuf dest = encode(src, src.readerIndex(), src.readableBytes(), breakLines, dialect);
src.readerIndex(src.writerIndex());
return dest;
}
代码示例来源:origin: redisson/redisson
@Override
protected void encode(ChannelHandlerContext ctx, ByteBuf msg, List<Object> out) throws Exception {
out.add(Base64.encode(msg, msg.readerIndex(), msg.readableBytes(), breakLines, dialect));
}
}
代码示例来源:origin: redisson/redisson
/**
* Same as {@link Base64#encode(ByteBuf, boolean)} but allows the use of a custom {@link ByteBufAllocator}.
*
* @see Base64#encode(ByteBuf, boolean)
*/
static ByteBuf toBase64(ByteBufAllocator allocator, ByteBuf src) {
ByteBuf dst = Base64.encode(src, src.readerIndex(),
src.readableBytes(), true, Base64Dialect.STANDARD, allocator);
src.readerIndex(src.writerIndex());
return dst;
}
代码示例来源:origin: redisson/redisson
public static ByteBuf encode(ByteBuf src, boolean breakLines, Base64Dialect dialect) {
if (src == null) {
throw new NullPointerException("src");
}
ByteBuf dest = encode(src, src.readerIndex(), src.readableBytes(), breakLines, dialect);
src.readerIndex(src.writerIndex());
return dest;
}
代码示例来源:origin: netty/netty
public static ByteBuf encode(
ByteBuf src, int off, int len, boolean breakLines, Base64Dialect dialect) {
return encode(src, off, len, breakLines, dialect, src.alloc());
}
代码示例来源:origin: netty/netty
public static ByteBuf encode(ByteBuf src, Base64Dialect dialect) {
return encode(src, breakLines(dialect), dialect);
}
代码示例来源:origin: netty/netty
public static ByteBuf encode(ByteBuf src, int off, int len, Base64Dialect dialect) {
return encode(src, off, len, breakLines(dialect), dialect);
}
代码示例来源:origin: redisson/redisson
public static ByteBuf encode(
ByteBuf src, int off, int len, boolean breakLines, Base64Dialect dialect) {
return encode(src, off, len, breakLines, dialect, src.alloc());
}
代码示例来源:origin: redisson/redisson
public static ByteBuf encode(ByteBuf src, Base64Dialect dialect) {
return encode(src, breakLines(dialect), dialect);
}
代码示例来源:origin: redisson/redisson
public static ByteBuf encode(ByteBuf src, int off, int len, Base64Dialect dialect) {
return encode(src, off, len, breakLines(dialect), dialect);
}
代码示例来源:origin: redisson/redisson
public static String hash128toBase64(ByteBuf objectState) {
long[] hash = hash128(objectState);
ByteBuf buf = ByteBufAllocator.DEFAULT.buffer((2 * Long.SIZE) / Byte.SIZE);
try {
buf.writeLong(hash[0]).writeLong(hash[1]);
ByteBuf b = Base64.encode(buf);
try {
String s = b.toString(CharsetUtil.UTF_8);
return s.substring(0, s.length() - 2);
} finally {
b.release();
}
} finally {
buf.release();
}
}
内容来源于网络,如有侵权,请联系作者删除!