Package redis.reply

Examples of redis.reply.IntegerReply


      assertEquals(message, new String((byte[]) receive.data()));
    }
    {
      os = new ByteArrayOutputStream();
      long integer = 999;
      new IntegerReply(integer).write(os);
      receive = RedisProtocol.receive(new ByteArrayInputStream(os.toByteArray()));
      assertTrue(receive instanceof IntegerReply);
      assertEquals(integer, receive.data());
    }
    {
      os = new ByteArrayOutputStream();
      String message = "OK";
      long integer = 999;
      new MultiBulkReply(new Reply[] {
              new StatusReply(message),
              new ErrorReply(message),
              new MultiBulkReply(new Reply[] { new StatusReply(message)}),
              new BulkReply(message.getBytes()),
              new IntegerReply(integer)}).write(os);
      receive = RedisProtocol.receive(new ByteArrayInputStream(os.toByteArray()));
      assertTrue(receive instanceof MultiBulkReply);
      Reply[] data = (Reply[]) receive.data();
      assertEquals(message, data[0].data());
      assertEquals(message, data[1].data());
View Full Code Here


      }
      case ErrorReply.MARKER: {
        return new ErrorReply(new DataInputStream(is).readLine());
      }
      case IntegerReply.MARKER: {
        return new IntegerReply(readLong(is));
      }
      case BulkReply.MARKER: {
        return new BulkReply(readBytes(is));
      }
      case MultiBulkReply.MARKER: {
View Full Code Here

TOP

Related Classes of redis.reply.IntegerReply

Copyright © 2018 www.massapicom. 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.