コード例 #1
0
 static Properties info(BulkReply reply) {
   Properties info = new Properties();
   // use the same charset as the library
   StringReader stringReader = new StringReader(new String(reply.data(), Charsets.UTF_8));
   try {
     info.load(stringReader);
   } catch (Exception ex) {
     throw new RedisSystemException("Cannot read Redis info", ex);
   } finally {
     stringReader.close();
   }
   return info;
 }
コード例 #2
0
 private void eq(String expected, BulkReply actual) {
   assertEquals(expected, actual.asUTF8String());
 }