コード例 #1
0
ファイル: Buffer.java プロジェクト: hugozhu/vert.x
 private Buffer setBytes(int pos, String str, Charset charset) {
   byte[] bytes = str.getBytes(charset);
   ensureWritable(pos, bytes.length);
   buffer.setBytes(pos, bytes);
   return this;
 }
コード例 #2
0
ファイル: Buffer.java プロジェクト: hugozhu/vert.x
 /**
  * Sets the bytes at position {@code pos} in the Buffer to the value {@code b}.
  *
  * <p>The buffer will expand as necessary to accomodate any value written.
  */
 public Buffer setBytes(int pos, ByteBuffer b) {
   ensureWritable(pos, b.limit());
   buffer.setBytes(pos, b);
   return this;
 }
コード例 #3
0
ファイル: Buffer.java プロジェクト: hugozhu/vert.x
 /**
  * Sets the bytes at position {@code pos} in the Buffer to the value {@code b}.
  *
  * <p>The buffer will expand as necessary to accomodate any value written.
  */
 public Buffer setBytes(int pos, byte[] b) {
   ensureWritable(pos, b.length);
   buffer.setBytes(pos, b);
   return this;
 }
コード例 #4
0
ファイル: Buffer.java プロジェクト: hugozhu/vert.x
 /**
  * Sets the bytes at position {@code pos} in the Buffer to the value {@code b}.
  *
  * <p>The buffer will expand as necessary to accomodate any value written.
  */
 public Buffer setBuffer(int pos, Buffer b) {
   ensureWritable(pos, b.length());
   buffer.setBytes(pos, b.getChannelBuffer());
   return this;
 }