Package reactor.io

Examples of reactor.io.Buffer$View


  }

  @Override
  public Long offer(@Nonnull T t) {
    synchronized (monitor) {
      Buffer buff = codec.encoder().apply(t);

      int len = buff.remaining();
      exAppender.startExcerpt(4 + len);
      exAppender.writeInt(len);
      exAppender.write(buff.byteBuffer());
      exAppender.finish();

      size.incrementAndGet();
      lastId.set(exAppender.lastWrittenIndex());
    }
View Full Code Here


    try {
      int len = ex.readInt();
      ByteBuffer bb = ByteBuffer.allocate(len);
      ex.read(bb);
      bb.flip();
      return codec.decoder(null).apply(new Buffer(bb));
    } finally {
      ex.finish();
    }
  }
View Full Code Here

        line = remainder.get().asString();
      }

      int start = 0;
      for (Buffer.View view : buffer.split('\n', false)) {
        Buffer b = view.get();
        if (b.last() != '\n') {
          remainder = view;
          return null;
        }
        String s = b.asString();
        if (null != line) {
          line += s;
        } else {
          line = s;
        }
View Full Code Here

TOP

Related Classes of reactor.io.Buffer$View

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.