Examples of readByte()


Examples of javax.imageio.stream.MemoryCacheImageInputStream.readByte()

        h.check(i.read() == 114);
        i.seek(0);
        h.check(i.readBoolean() == true);
        i.seek(0);
        h.check(i.readByte() == 114);
        i.seek(0);
        h.check(i.readChar() == '\u7270');
        i.seek(0);
        h.check(Double.compare(i.readDouble(), 1.709290273164385E243) == 0);
        i.seek(0);
View Full Code Here

Examples of javax.jms.BytesMessage.readByte()

      sent.writeUTF("31415926535897932384626433832795");

      BytesMessage recv = (BytesMessage) sendRecMsg(sent);
      log.debug("recv: "+recv);
      assertTrue("Boolean == true", recv.readBoolean() == true);
      assertTrue("Byte == 1", recv.readByte() == 1);
      byte[] bytes = new byte[testBytes.length];
      recv.readBytes(bytes);
      assertTrue("Bytes == Bytes[]",
         Arrays.equals(bytes, testBytes));
      assertTrue("Char == c", recv.readChar() == 'c');
View Full Code Here

Examples of javax.jms.StreamMessage.readByte()

      sent.writeString("31415926535897932384626433832795");

      StreamMessage recv = (StreamMessage) sendRecMsg(sent);
      log.debug("recv: "+recv);
      assertTrue("Boolean == true", recv.readBoolean() == true);
      assertTrue("Byte == 1", recv.readByte() == 1);
      // Quirky spec behavior requires a read past the end of the byte[] field
      byte[] bytes = new byte[testBytes.length];
      recv.readBytes(bytes);
      assertTrue(recv.readBytes(bytes) < 0);
      assertTrue("Bytes == Bytes[]",
View Full Code Here

Examples of javax.sql.rowset.serial.SQLInputImpl.readByte()

     */
    public void testReadByte() throws SQLException {
        Object[] attributes = new Object[] { Byte.valueOf("3") };
        SQLInputImpl impl = new SQLInputImpl(attributes,
                new HashMap<String, Class<?>>());
        assertEquals((byte) 3, impl.readByte());

        try {
            impl.readByte();
            fail("should throw SQLException");
        } catch (SQLException e) {
View Full Code Here

Examples of marauroa.common.net.InputSerializer.readByte()

            new java.util.zip.Inflater());
    InputSerializer ser = new InputSerializer(szlib);
    ser.setProtocolVersion(protocolVersion);

    try {
      typePerception = ser.readByte();
      zoneid = (IRPZone.ID) ser.readObject(new IRPZone.ID(""));
      addedRPObjects = new LinkedList<RPObject>();
      deletedRPObjects = new LinkedList<RPObject>();
      modifiedAddedAttribsRPObjects = new LinkedList<RPObject>();
      modifiedDeletedAttribsRPObjects = new LinkedList<RPObject>();
View Full Code Here

Examples of mungbean.protocol.LittleEndianDataReader.readByte()

            specify(out.toByteArray(), does.containExactly(MAP_FIXTURE));
        }

        public void mapCanBeDecodedFromBson() {
            LittleEndianDataReader reader = new LittleEndianDataReader(new ByteArrayInputStream(MAP_FIXTURE));
            specify(reader.readByte(), does.equal((byte) 3));
            specify(context.readPath(reader, ""), does.equal("foo"));
            Map<String, Object> ret = context.read(new MapBSONCoders(), reader);
            specify(ret.get("foo"), does.equal(1));
            specify(ret.get("bar"), new HashMap<String, Object>() {
                {
View Full Code Here

Examples of net.bnubot.core.BNetInputStream.readByte()

 
  public MCPPacketReader(InputStream rawis, boolean packetLog) throws IOException {
    BNetInputStream is = new BNetInputStream(rawis);
   
    packetLength = is.readWord() & 0x0000FFFF;
    packetId = is.readByte() & 0x000000FF;
    assert(packetLength >= 3);
   
    data = new byte[packetLength-3];
    for(int i = 0; i < packetLength-3; i++) {
      data[i] = is.readByte();
View Full Code Here

Examples of net.bnubot.util.BNetInputStream.readByte()

        p.sendPacket(bncsOutputStream);
        break;
      }

      case SID_NEWS_INFO: {
        int numEntries = is.readByte();
        // int lastLogon = is.readDWord();
        // int oldestNews = is.readDWord();
        // int newestNews = is.readDWord();;
        is.skip(12);
View Full Code Here

Examples of net.minecraft.network.PacketBuffer.readByte()

                {
                    packetbuffer = new PacketBuffer(Unpooled.wrappedBuffer(p_147349_1_.func_149558_e()));

                    try
                    {
                        byte b0 = packetbuffer.readByte();
                        CommandBlockLogic commandblocklogic = null;

                        if (b0 == 0)
                        {
                            TileEntity tileentity = net.playerEntity.worldObj.getTileEntity(packetbuffer.readInt(), packetbuffer.readInt(), packetbuffer.readInt());
View Full Code Here

Examples of net.rim.device.api.util.DataBuffer.readByte()

    private static DataBuffer getDataBuffer( final ServiceRecord record, final int type ) {
        final byte[] data = record.getApplicationData();
        if( data != null ) {
            final DataBuffer buffer = new DataBuffer( data, 0, data.length, true );
            try {
                buffer.readByte();
            } catch( final EOFException e1 ) {
                return null;
            }
            if( ConverterUtilities.findType( buffer, type ) ) {
                return buffer;
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.