Java Code Examples for javax.imageio.ImageWriter#canWriteSequence()
The following examples show how to use
javax.imageio.ImageWriter#canWriteSequence() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CanWriteSequence.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
private static void test(final ImageWriter writer) throws Exception { final File file = File.createTempFile("temp", ".img"); file.deleteOnExit(); final FileOutputStream fos = new FileOutputStream(file); final ImageOutputStream ios = ImageIO.createImageOutputStream(fos); writer.setOutput(ios); final IIOMetadata data = writer.getDefaultStreamMetadata(null); if (writer.canWriteSequence()) { writer.prepareWriteSequence(data); } else { try { writer.prepareWriteSequence(data); throw new RuntimeException( "UnsupportedOperationException was not thrown"); } catch (final UnsupportedOperationException ignored) { // expected } } writer.dispose(); ios.close(); }
Example 2
Source File: CanWriteSequence.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private static void test(final ImageWriter writer) throws Exception { final File file = File.createTempFile("temp", ".img"); file.deleteOnExit(); final FileOutputStream fos = new FileOutputStream(file); final ImageOutputStream ios = ImageIO.createImageOutputStream(fos); writer.setOutput(ios); final IIOMetadata data = writer.getDefaultStreamMetadata(null); if (writer.canWriteSequence()) { writer.prepareWriteSequence(data); } else { try { writer.prepareWriteSequence(data); throw new RuntimeException( "UnsupportedOperationException was not thrown"); } catch (final UnsupportedOperationException ignored) { // expected } } writer.dispose(); ios.close(); }
Example 3
Source File: CanWriteSequence.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private static void test(final ImageWriter writer) throws Exception { final File file = File.createTempFile("temp", ".img"); file.deleteOnExit(); final FileOutputStream fos = new FileOutputStream(file); final ImageOutputStream ios = ImageIO.createImageOutputStream(fos); writer.setOutput(ios); final IIOMetadata data = writer.getDefaultStreamMetadata(null); if (writer.canWriteSequence()) { writer.prepareWriteSequence(data); } else { try { writer.prepareWriteSequence(data); throw new RuntimeException( "UnsupportedOperationException was not thrown"); } catch (final UnsupportedOperationException ignored) { // expected } } writer.dispose(); ios.close(); }
Example 4
Source File: CanWriteSequence.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private static void test(final ImageWriter writer) throws Exception { final File file = File.createTempFile("temp", ".img"); file.deleteOnExit(); final FileOutputStream fos = new FileOutputStream(file); final ImageOutputStream ios = ImageIO.createImageOutputStream(fos); writer.setOutput(ios); final IIOMetadata data = writer.getDefaultStreamMetadata(null); if (writer.canWriteSequence()) { writer.prepareWriteSequence(data); } else { try { writer.prepareWriteSequence(data); throw new RuntimeException( "UnsupportedOperationException was not thrown"); } catch (final UnsupportedOperationException ignored) { // expected } } writer.dispose(); ios.close(); }
Example 5
Source File: CanWriteSequence.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private static void test(final ImageWriter writer) throws Exception { final File file = File.createTempFile("temp", ".img"); file.deleteOnExit(); final FileOutputStream fos = new FileOutputStream(file); final ImageOutputStream ios = ImageIO.createImageOutputStream(fos); writer.setOutput(ios); final IIOMetadata data = writer.getDefaultStreamMetadata(null); if (writer.canWriteSequence()) { writer.prepareWriteSequence(data); } else { try { writer.prepareWriteSequence(data); throw new RuntimeException( "UnsupportedOperationException was not thrown"); } catch (final UnsupportedOperationException ignored) { // expected } } writer.dispose(); ios.close(); }
Example 6
Source File: CanWriteSequence.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private static void test(final ImageWriter writer) throws Exception { final File file = File.createTempFile("temp", ".img"); file.deleteOnExit(); final FileOutputStream fos = new FileOutputStream(file); final ImageOutputStream ios = ImageIO.createImageOutputStream(fos); writer.setOutput(ios); final IIOMetadata data = writer.getDefaultStreamMetadata(null); if (writer.canWriteSequence()) { writer.prepareWriteSequence(data); } else { try { writer.prepareWriteSequence(data); throw new RuntimeException( "UnsupportedOperationException was not thrown"); } catch (final UnsupportedOperationException ignored) { // expected } } writer.dispose(); ios.close(); }
Example 7
Source File: CanWriteSequence.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private static void test(final ImageWriter writer) throws Exception { final File file = File.createTempFile("temp", ".img"); file.deleteOnExit(); final FileOutputStream fos = new FileOutputStream(file); final ImageOutputStream ios = ImageIO.createImageOutputStream(fos); writer.setOutput(ios); final IIOMetadata data = writer.getDefaultStreamMetadata(null); if (writer.canWriteSequence()) { writer.prepareWriteSequence(data); } else { try { writer.prepareWriteSequence(data); throw new RuntimeException( "UnsupportedOperationException was not thrown"); } catch (final UnsupportedOperationException ignored) { // expected } } writer.dispose(); ios.close(); }
Example 8
Source File: CanWriteSequence.java From hottub with GNU General Public License v2.0 | 6 votes |
private static void test(final ImageWriter writer) throws Exception { final File file = File.createTempFile("temp", ".img"); file.deleteOnExit(); final FileOutputStream fos = new FileOutputStream(file); final ImageOutputStream ios = ImageIO.createImageOutputStream(fos); writer.setOutput(ios); final IIOMetadata data = writer.getDefaultStreamMetadata(null); if (writer.canWriteSequence()) { writer.prepareWriteSequence(data); } else { try { writer.prepareWriteSequence(data); throw new RuntimeException( "UnsupportedOperationException was not thrown"); } catch (final UnsupportedOperationException ignored) { // expected } } writer.dispose(); ios.close(); }
Example 9
Source File: CanWriteSequence.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
private static void test(final ImageWriter writer) throws Exception { final File file = File.createTempFile("temp", ".img"); file.deleteOnExit(); final FileOutputStream fos = new FileOutputStream(file); final ImageOutputStream ios = ImageIO.createImageOutputStream(fos); writer.setOutput(ios); final IIOMetadata data = writer.getDefaultStreamMetadata(null); if (writer.canWriteSequence()) { writer.prepareWriteSequence(data); } else { try { writer.prepareWriteSequence(data); throw new RuntimeException( "UnsupportedOperationException was not thrown"); } catch (final UnsupportedOperationException ignored) { // expected } } writer.dispose(); ios.close(); }