Ejemplo n.º 1
0
 /** Create a new big-endian buffer that holds a sequence of the specified 24-bit integers. */
 public static ByteBuf copyMedium(int... values) {
   if (values == null || values.length == 0) {
     return EMPTY_BUFFER;
   }
   ByteBuf buffer = buffer(values.length * 3);
   for (int v : values) {
     buffer.writeMedium(v);
   }
   return buffer;
 }
Ejemplo n.º 2
0
 @Override
 public ByteBuf writeMedium(int value) {
   buf.writeMedium(value);
   return this;
 }
Ejemplo n.º 3
0
 /** Creates a new 3-byte big-endian buffer that holds the specified 24-bit integer. */
 public static ByteBuf copyMedium(int value) {
   ByteBuf buf = buffer(3);
   buf.writeMedium(value);
   return buf;
 }