@Test public void testIsImageWithNonImage() throws Exception { final InputStream input = getClass().getResourceAsStream( "/privatekey.pem" ); final boolean result = GraphicsUtils.isImage( input ); assertFalse( result ); }
public static boolean isImage( final InputStream stream ) { try { return null != ImageIO.read( stream ); } catch ( IOException e ) { Log.debug( "An exception occurred while determining if data represents an image.", e ); return false; } }
GraphicsUtils { public static boolean isImage( final InputStream stream ) { try { return null != ImageIO.read( stream ); } catch ( IOException e ) { Log.debug( "An exception occurred while determining if data represents an image.", e ); return false; } } }
GraphicsUtils { public static boolean isImage( final InputStream stream ) { try { return null != ImageIO.read( stream ); } catch ( IOException e ) { Log.debug( "An exception occurred while determining if data represents an image.", e ); return false; } }  }
GraphicsUtils { public static boolean isImage( final InputStream stream ) { try { return null != ImageIO.read( stream ); } catch ( IOException e ) { Log.debug( "An exception occurred while determining if data represents an image.", e ); return false; } }  static boolean isImage( final InputStream stream ); static boolean isImage( final byte[] bytes ); }
GraphicsUtils { public static boolean isImage( final InputStream stream ) { try { return null != ImageIO.read( stream ); } catch ( IOException e ) { Log.debug( "An exception occurred while determining if data represents an image.", e ); return false; } }  static boolean isImage( final InputStream stream ); static boolean isImage( final byte[] bytes );  }