Skip to content

Commit

Permalink
Remove double ImagingException
Browse files Browse the repository at this point in the history
  • Loading branch information
BuZZ-dEE committed Nov 9, 2024
1 parent 758002d commit 9956daf
Showing 1 changed file with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,10 @@ public void removeXmpXml(final InputStream src, final OutputStream os) throws Im
* @param src Byte array containing JPEG image data.
* @param os OutputStream to write the image to.
* @param xmpXml String containing XMP XML.
* @throws ImagingException if it fails to read the JFIF segments
* @throws ImagingException if it fails to read or write the JFIF segments
* @throws IOException if it fails to read or write the data from the segments
* @throws ImagingException if it fails to write the JFIF segments
*/
public void updateXmpXml(final byte[] src, final OutputStream os, final String xmpXml) throws ImagingException, IOException, ImagingException {
public void updateXmpXml(final byte[] src, final OutputStream os, final String xmpXml) throws ImagingException, IOException {
final ByteSource byteSource = ByteSource.array(src);
updateXmpXml(byteSource, os, xmpXml);
}
Expand All @@ -116,11 +115,10 @@ public void updateXmpXml(final byte[] src, final OutputStream os, final String x
* @param byteSource ByteSource containing JPEG image data.
* @param os OutputStream to write the image to.
* @param xmpXml String containing XMP XML.
* @throws ImagingException if it fails to read the JFIF segments
* @throws ImagingException if it fails to read or write the JFIF segments
* @throws IOException if it fails to read or write the data from the segments
* @throws ImagingException if it fails to write the JFIF segments
*/
public void updateXmpXml(final ByteSource byteSource, final OutputStream os, final String xmpXml) throws ImagingException, IOException, ImagingException {
public void updateXmpXml(final ByteSource byteSource, final OutputStream os, final String xmpXml) throws ImagingException, IOException {
final JFIFPieces jfifPieces = analyzeJfif(byteSource);
List<JFIFPiece> pieces = jfifPieces.pieces;
pieces = removeXmpSegments(pieces);
Expand All @@ -146,11 +144,10 @@ public void updateXmpXml(final ByteSource byteSource, final OutputStream os, fin
* @param src Image file.
* @param os OutputStream to write the image to.
* @param xmpXml String containing XMP XML.
* @throws ImagingException if it fails to read the JFIF segments
* @throws ImagingException if it fails to read or write the JFIF segments
* @throws IOException if it fails to read or write the data from the segments
* @throws ImagingException if it fails to write the JFIF segments
*/
public void updateXmpXml(final File src, final OutputStream os, final String xmpXml) throws ImagingException, IOException, ImagingException {
public void updateXmpXml(final File src, final OutputStream os, final String xmpXml) throws ImagingException, IOException {
final ByteSource byteSource = ByteSource.file(src);
updateXmpXml(byteSource, os, xmpXml);
}
Expand All @@ -161,11 +158,10 @@ public void updateXmpXml(final File src, final OutputStream os, final String xmp
* @param src InputStream containing JPEG image data.
* @param os OutputStream to write the image to.
* @param xmpXml String containing XMP XML.
* @throws ImagingException if it fails to read the JFIF segments
* @throws ImagingException if it fails to read or write the JFIF segments
* @throws IOException if it fails to read or write the data from the segments
* @throws ImagingException if it fails to write the JFIF segments
*/
public void updateXmpXml(final InputStream src, final OutputStream os, final String xmpXml) throws ImagingException, IOException, ImagingException {
public void updateXmpXml(final InputStream src, final OutputStream os, final String xmpXml) throws ImagingException, IOException {
final ByteSource byteSource = ByteSource.inputStream(src, null);
updateXmpXml(byteSource, os, xmpXml);
}
Expand Down

0 comments on commit 9956daf

Please sign in to comment.