コード例 #1
0
 @Override
 public final MediaContent deserialize(byte[] array) throws IOException {
   JsonParser parser = constructParser(array);
   MediaContent mc = readMediaContent(parser);
   parser.close();
   return mc;
 }
コード例 #2
0
 @Override
 public MediaContent[] deserializeItems(InputStream in, int numberOfItems) throws IOException {
   MediaContent[] result = new MediaContent[numberOfItems];
   JsonParser parser = constructParser(in);
   for (int i = 0; i < numberOfItems; ++i) {
     result[i] = readMediaContent(parser);
   }
   parser.close();
   return result;
 }