Skip to content

Commit

Permalink
PDFBOX-5660: remove obsolete class NullOutputStream, by Axel Howind
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1913595 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Nov 5, 2023
1 parent 579d191 commit 1347d2b
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,12 @@ public static void validate(PDImageXObject ximage, int bpc, int width, int heigh
}
if (canEncode)
{
writeOk = ImageIO.write(ximage.getImage(), format, new NullOutputStream());
writeOk = ImageIO.write(ximage.getImage(), format, OutputStream.nullOutputStream());
assertTrue(writeOk);
}
writeOk = ImageIO.write(ximage.getOpaqueImage(null, 1), format, new NullOutputStream());
writeOk = ImageIO.write(ximage.getOpaqueImage(null, 1), format, OutputStream.nullOutputStream());
assertTrue(writeOk);
}

private static class NullOutputStream extends OutputStream
{
@Override
public void write(int b) throws IOException
{
}
}

public static int colorCount(BufferedImage bim)
{
Expand Down

0 comments on commit 1347d2b

Please sign in to comment.