@Test public void testOverflowEncodedBufferSize() { assertEquals(Integer.MAX_VALUE, Base64.encodedBufferSize(Integer.MAX_VALUE, true)); assertEquals(Integer.MAX_VALUE, Base64.encodedBufferSize(Integer.MAX_VALUE, false)); }
static int encodedBufferSize(int len, boolean breakLines) { long len43 = ((long) len << 2) / 3; long ret = (len43 + 3) & ~3; if (breakLines) { ret += len43 / MAX_LINE_LENGTH; } return ret < Integer.MAX_VALUE ? (int) ret : Integer.MAX_VALUE; }
Base64 { static int encodedBufferSize(int len, boolean breakLines) { long len43 = ((long) len << 2) / 3; long ret = (len43 + 3) & ~3; if (breakLines) { ret += len43 / MAX_LINE_LENGTH; } return ret < Integer.MAX_VALUE ? (int) ret : Integer.MAX_VALUE; } }
Base64 { static int encodedBufferSize(int len, boolean breakLines) { long len43 = ((long) len << 2) / 3; long ret = (len43 + 3) & ~3; if (breakLines) { ret += len43 / MAX_LINE_LENGTH; } return ret < Integer.MAX_VALUE ? (int) ret : Integer.MAX_VALUE; } private  Base64(); }
Base64 { static int encodedBufferSize(int len, boolean breakLines) { long len43 = ((long) len << 2) / 3; long ret = (len43 + 3) & ~3; if (breakLines) { ret += len43 / MAX_LINE_LENGTH; } return ret < Integer.MAX_VALUE ? (int) ret : Integer.MAX_VALUE; } private  Base64(); static ByteBuf encode(ByteBuf src); static ByteBuf encode(ByteBuf src, Base64Dialect dialect); static ByteBuf encode(ByteBuf src, boolean breakLines); static ByteBuf encode(ByteBuf src, boolean breakLines, Base64Dialect dialect); static ByteBuf encode(ByteBuf src, int off, int len); static ByteBuf encode(ByteBuf src, int off, int len, Base64Dialect dialect); static ByteBuf encode(
            ByteBuf src, int off, int len, boolean breakLines); static ByteBuf encode(
            ByteBuf src, int off, int len, boolean breakLines, Base64Dialect dialect); static ByteBuf encode(
            ByteBuf src, int off, int len, boolean breakLines, Base64Dialect dialect, ByteBufAllocator allocator); static ByteBuf decode(ByteBuf src); static ByteBuf decode(ByteBuf src, Base64Dialect dialect); static ByteBuf decode(
            ByteBuf src, int off, int len); static ByteBuf decode(
            ByteBuf src, int off, int len, Base64Dialect dialect); static ByteBuf decode(
            ByteBuf src, int off, int len, Base64Dialect dialect, ByteBufAllocator allocator); }
Base64 { static int encodedBufferSize(int len, boolean breakLines) { long len43 = ((long) len << 2) / 3; long ret = (len43 + 3) & ~3; if (breakLines) { ret += len43 / MAX_LINE_LENGTH; } return ret < Integer.MAX_VALUE ? (int) ret : Integer.MAX_VALUE; } private  Base64(); static ByteBuf encode(ByteBuf src); static ByteBuf encode(ByteBuf src, Base64Dialect dialect); static ByteBuf encode(ByteBuf src, boolean breakLines); static ByteBuf encode(ByteBuf src, boolean breakLines, Base64Dialect dialect); static ByteBuf encode(ByteBuf src, int off, int len); static ByteBuf encode(ByteBuf src, int off, int len, Base64Dialect dialect); static ByteBuf encode(
            ByteBuf src, int off, int len, boolean breakLines); static ByteBuf encode(
            ByteBuf src, int off, int len, boolean breakLines, Base64Dialect dialect); static ByteBuf encode(
            ByteBuf src, int off, int len, boolean breakLines, Base64Dialect dialect, ByteBufAllocator allocator); static ByteBuf decode(ByteBuf src); static ByteBuf decode(ByteBuf src, Base64Dialect dialect); static ByteBuf decode(
            ByteBuf src, int off, int len); static ByteBuf decode(
            ByteBuf src, int off, int len, Base64Dialect dialect); static ByteBuf decode(
            ByteBuf src, int off, int len, Base64Dialect dialect, ByteBufAllocator allocator);  }