@Override public final MediaContent deserialize(byte[] array) throws IOException { JsonParser parser = constructParser(array); MediaContent mc = readMediaContent(parser); parser.close(); return mc; }
@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; }