question: public static XMPMeta extractXMPMeta ( InputStream is ) { List < Section > sections = parse ( is , true ) ; if ( sections == null ) { return null ; } for ( Section section : sections ) { if ( hasXMPHeader ( section . data ) ) { int end = getXMPContentEnd ( section . data ) ; byte [ ] buffer = new byte [ end - XMP_HEADER_SIZE ] ; System . arraycopy ( section . data , XMP_HEADER_SIZE , buffer , 0 , buffer . length ) ; try { XMPMeta result = XMPMetaFactory . parseFromBuffer ( buffer ) ; return result ; } catch ( XMPException e ) { Log . d ( TAG , "XMP parse error" , e ) ; return null ; } } } return null ; }
target:  Extracts XMPMeta from a JPEG image file stream.