Package com.google.code.yanf4j.buffer

Examples of com.google.code.yanf4j.buffer.IoBuffer.flip()


        buf.flip();
        assertEquals("hello", buf.getString(charset.newDecoder()));

        buf.clear();
        buf.putString("hello", charset.newEncoder());
        buf.flip();
        assertEquals("hello", buf.getString(charset.newDecoder()));

        decoder = Charset.forName("ISO-8859-1").newDecoder();
        buf.clear();
        buf.put((byte) 'A');
View Full Code Here


      byte[] bytes = new byte[buff.remaining()];
      buff.get(bytes);
      IoBuffer result = IoBuffer.allocate(bytes.length,
          ByteBufferCodecFactory.this.direct);
      result.put(bytes);
      result.flip();
      return result;
    }

  }
View Full Code Here

      byte[] bytes = new byte[msgBuffer.remaining()];
      msgBuffer.get(bytes);
      IoBuffer result = IoBuffer.allocate(bytes.length,
          ByteBufferCodecFactory.this.direct);
      result.put(bytes);
      result.flip();
      return result;
    }

  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.