List of usage examples for org.apache.wicket.util.io IOUtils contentEquals
public static boolean contentEquals(Reader input1, Reader input2) throws IOException
From source file:org.hippoecm.frontend.plugins.gallery.imageutil.ImageBinaryTest.java
License:Apache License
@Test public void testStreams() throws Exception { ImageBinary binary = createImageBinary(TEST_RGB_JPG, JPEG_MIME_TYPE); assertTrue(IOUtils.contentEquals(readImage(TEST_RGB_JPG), binary.getStream())); imageNode.setProperty("jcr:data", binary); session.save();/*from w ww .j a v a2s.co m*/ Binary savedBinary = imageNode.getProperty("jcr:data").getBinary(); assertTrue(IOUtils.contentEquals(savedBinary.getStream(), binary.getStream())); }