Examples of writeShort()


Examples of com.netflix.astyanax.serializers.ByteBufferOutputStream.writeShort()

                if (aliasToComparatorMapping.inverse().containsKey(comparator)) {
                    byte a = aliasToComparatorMapping.inverse().get(comparator);
                    if (desc) {
                        a = (byte) Character.toUpperCase((char) a);
                    }
                    out.writeShort((short) (0x8000 | a));
                }
                else {
                    out.writeShort((short) comparator.length());
                    out.write(ByteBufferUtil.bytes(comparator));
                }
View Full Code Here

Examples of com.orientechnologies.orient.core.storage.fs.OFile.writeShort()

  protected void writeRecord(final long[] iFilePosition, final int iClusterSegment, final long iClusterPosition,
      final byte[] iContent) throws IOException {
    final OFile file = files[(int) iFilePosition[0]];

    file.writeInt(iFilePosition[1], iContent.length);
    file.writeShort(iFilePosition[1] + OConstants.SIZE_INT, (short) iClusterSegment);
    file.writeLong(iFilePosition[1] + OConstants.SIZE_INT + OConstants.SIZE_SHORT, iClusterPosition);

    file.write(iFilePosition[1] + RECORD_FIX_SIZE, iContent);
  }
View Full Code Here

Examples of com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.writeShort()

      try {
        final OChannelBinaryAsynchClient network = beginRequest(OChannelBinaryProtocol.REQUEST_RECORD_CREATE);
        lastNetworkUsed = network;

        try {
          network.writeShort((short) iRid.clusterId);
          network.writeBytes(iContent);
          network.writeByte(iRecordType);
          network.writeByte((byte) iMode);

        } finally {
View Full Code Here

Examples of com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryClient.writeShort()

        OChannelBinaryClient network = null;
        try {
          network = beginRequest(OChannelBinaryProtocol.REQUEST_RECORD_CREATE);

          network.writeShort((short) iRid.clusterId);
          network.writeBytes(iContent);
          network.writeByte(iRecordType);

        } finally {
          endRequest(network);
View Full Code Here

Examples of com.peterhi.obsolete.Stream.writeShort()

    try {
      Stream stream = new Stream();
      stream.writeBit(1);
     
      for (short sh : sampleShorts()) {
        stream.writeShort(sh);
      }
     
      stream.writeBit(1);
     
      stream.readBit();
View Full Code Here

Examples of com.peterhi.runtime.MemoryStream.writeShort()

          ms.write(((index & 0x0f) << 4) | ((length & 0x0f) << 0));
        } else if (sizeType == 2) {
          ms.write(index);
          ms.write(length);
        } else {
          ms.writeShort(index);
          ms.writeShort(length);
        }
       
        ms.write(frame.getData());
       
View Full Code Here

Examples of htsjdk.tribble.util.LittleEndianOutputStream.writeShort()

        LittleEndianOutputStream los = new LittleEndianOutputStream(new BufferedOutputStream(new FileOutputStream("les_test.bin")));

        los.writeString("Binary test file");
        los.writeFloat(Float.MAX_VALUE);
        los.writeByte(Byte.MAX_VALUE);
        los.writeShort(Short.MAX_VALUE);
        los.writeInt(Integer.MAX_VALUE);
        los.writeLong(Long.MAX_VALUE);
        los.writeDouble(Double.MAX_VALUE);

        los.close();
View Full Code Here

Examples of io.netty.buffer.ByteBuf.writeShort()

            Message.Type type = frame.header.type;
            header.writeByte(type.direction.addToVersion(frame.header.version));
            header.writeByte(Header.Flag.serialize(frame.header.flags));

            if (frame.header.version >= Server.VERSION_3)
                header.writeShort(frame.header.streamId);
            else
                header.writeByte(frame.header.streamId);

            header.writeByte(type.opcode);
            header.writeInt(frame.body.readableBytes());
View Full Code Here

Examples of io.netty.buffer.ChannelBuffer.writeShort()

        case 2:
            if (length >= 65536) {
                throw new IllegalArgumentException(
                        "length does not fit into a short integer: " + length);
            }
            header.writeShort((short) length);
            break;
        case 3:
            if (length >= 16777216) {
                throw new IllegalArgumentException(
                        "length does not fit into a medium integer: " + length);
View Full Code Here

Examples of java.io.DataOutput.writeShort()

            canon.writeInt(v);
        }
        {
            short v = (short) rnd.nextInt();
            test.writeShort(v);
            canon.writeShort(v);
        }
        {
            byte v = (byte) rnd.nextInt();
            test.write(v);
            canon.write(v);
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.