Examples of readByte()


Examples of org.apache.thrift.protocol.TProtocol.readByte()

 
  public static void testNakedByte() throws Exception {
    TMemoryBuffer buf = new TMemoryBuffer(0);
    TProtocol proto = factory.getProtocol(buf);
    proto.writeByte((byte)123);
    byte out = proto.readByte();
    if (out != 123) {
      throw new RuntimeException("Byte was supposed to be " + (byte)123 + " but was " + out);
    }
  }
 
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol.readByte()

          for (int _i53 = 0; _i53 < _map52.size; ++_i53)
          {
            String _key54;
            byte _val55;
            _key54 = iprot.readString();
            _val55 = iprot.readByte();
            struct.badTServers.put(_key54, _val55);
          }
        }
        struct.setBadTServersIsSet(true);
      }
View Full Code Here

Examples of org.apache.webbeans.util.OwbCustomObjectInputStream.readByte()

        //process annotations
        ownerBean = webBeansContext.getBeanManagerImpl().getBeans(beanClass, anns.toArray(new Annotation[anns.size()])).iterator().next();
        qualifierAnnotations = anns;
       
        // determine type of injection point member (0=field, 1=method, 2=constructor) and read...
        int c = in.readByte();
        if(c == 0)
        {
            String fieldName = in.readUTF();
            Field field = webBeansContext.getSecurityService().doPrivilegedGetDeclaredField(beanClass, fieldName);
View Full Code Here

Examples of org.apache.xindice.xml.XMLCompressedInput.readByte()

            SymbolTable st = doc.getSymbols();

            ByteArrayInput bis = new ByteArrayInput(data, pos, len);
            XMLCompressedInput xci = new XMLCompressedInput(bis, st);

            byte signature = xci.readByte();
            byte entityType = (byte)(signature & 0x1F);
            switch ( entityType ) {

               case Signatures.EntUnknown:
                  nodeName = null;
View Full Code Here

Examples of org.codehaus.activemq.message.ActiveMQBytesMessage.readByte()

  public void testReadByte() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      msg.writeByte((byte) 2);
      msg.reset();
      assertTrue(msg.readByte() == 2);
    } catch (JMSException jmsEx) {
      jmsEx.printStackTrace();
      assertTrue(false);
    }
  }
View Full Code Here

Examples of org.codehaus.activemq.message.ActiveMQStreamMessage.readByte()

    ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
    try {
      byte testByte = (byte)2;
      msg.writeString(new Byte(testByte).toString());
      msg.reset();
      assertTrue(msg.readByte()==testByte);
      msg.clearBody();
      short testShort = 3;
      msg.writeString(new Short(testShort).toString());
      msg.reset();
      assertTrue(msg.readShort()==testShort);
View Full Code Here

Examples of org.elasticsearch.common.io.stream.BytesStreamInput.readByte()

        out.writeUTF("hello");
        out.writeUTF("goodbye");

        BytesStreamInput in = new BytesStreamInput(out.copiedByteArray());
        assertThat(in.readBoolean(), equalTo(false));
        assertThat(in.readByte(), equalTo((byte) 1));
        assertThat(in.readShort(), equalTo((short) -1));
        assertThat(in.readInt(), equalTo(-1));
        assertThat(in.readVInt(), equalTo(2));
        assertThat(in.readLong(), equalTo((long) -3));
        assertThat(in.readVLong(), equalTo((long) 4));
View Full Code Here

Examples of org.elasticsearch.common.io.stream.InputStreamStreamInput.readByte()

            // 0x3f => Lucene's magic number, so we can assume it's version 1 or later
            // 0x00 => version 0 of the translog
            //
            // otherwise the first byte of the translog is corrupted and we
            // should bail
            byte b1 = headerStream.readByte();
            if (b1 == LUCENE_CODEC_HEADER_BYTE) {
                // Read 3 more bytes, meaning a whole integer has been read
                byte b2 = headerStream.readByte();
                byte b3 = headerStream.readByte();
                byte b4 = headerStream.readByte();
View Full Code Here

Examples of org.elasticsearch.common.io.stream.StreamInput.readByte()

        StreamInput stream = new BytesStreamInput(data);
        stream = CachedStreamInput.cachedHandles(stream);

        try {
            long requestId = stream.readLong();
            byte status = stream.readByte();
            boolean isRequest = TransportStreams.statusIsRequest(status);

            if (isRequest) {
                handleRequest(stream, requestId, sourceTransport);
            } else {
View Full Code Here

Examples of org.elasticsearch.common.netty.buffer.ChannelBuffer.readByte()

        int expectedIndexReader = markedReaderIndex + size;

        StreamInput streamIn = new ChannelBufferStreamInput(buffer, size);

        long requestId = buffer.readLong();
        byte status = buffer.readByte();
        boolean isRequest = TransportStreams.statusIsRequest(status);

        HandlesStreamInput handlesStream;
        if (TransportStreams.statusIsCompress(status)) {
            handlesStream = CachedStreamInput.cachedHandlesLzf(streamIn);
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.