Class ByteBufWriter

java.lang.Object
java.io.Writer
io.activej.bytebuf.util.ByteBufWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public final class ByteBufWriter extends Writer
An implementation of character Writer, that appends characters it received to an allocated ByteBuf. The byte buf can grow (via reallocation) so it is limited only by available RAM.

This is a useful proxy between ActiveJ ByteBufs and API's that use standard Java writers.

  • Field Details

    • INITIAL_BUF_SIZE

      public static final MemSize INITIAL_BUF_SIZE
  • Constructor Details

    • ByteBufWriter

      public ByteBufWriter()
    • ByteBufWriter

      public ByteBufWriter(MemSize initialSize)
    • ByteBufWriter

      public ByteBufWriter(Charset charset)
    • ByteBufWriter

      public ByteBufWriter(MemSize initialSize, Charset charset)
  • Method Details