Package javax.imageio.stream

Examples of javax.imageio.stream.ImageOutputStream.reset()


            int pos = 0;
            try {
                ios.mark();
                do {
                    if (pos >= length) {
                        ios.reset();
                        ios.mark();
                        pos = 0;
                    }
                    ios.write(0);
                    pos++;
View Full Code Here


                    pos++;
                } while (--numReps >= 0);
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                try { ios.reset(); } catch (IOException e) {}
            }
        }
    }

    private static class IOSWriteByteArray extends OutputStreamTests {
View Full Code Here

            int pos = 0;
            try {
                ios.mark();
                do {
                    if (pos + scanlineStride > length) {
                        ios.reset();
                        ios.mark();
                        pos = 0;
                    }
                    ios.write(buf);
                    pos += scanlineStride;
View Full Code Here

                    pos += scanlineStride;
                } while (--numReps >= 0);
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                try { ios.reset(); } catch (IOException e) {}
            }
        }
    }

    private static class IOSWriteBit extends OutputStreamTests {
View Full Code Here

            int pos = 0; // measured in bits
            try {
                ios.mark();
                do {
                    if (pos >= length) {
                        ios.reset();
                        ios.mark();
                        pos = 0;
                    }
                    ios.writeBit(0);
                    pos++;
View Full Code Here

                    pos++;
                } while (--numReps >= 0);
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                try { ios.reset(); } catch (IOException e) {}
            }
        }
    }

    private static class IOSWriteByte extends OutputStreamTests {
View Full Code Here

            int pos = 0;
            try {
                ios.mark();
                do {
                    if (pos >= length) {
                        ios.reset();
                        ios.mark();
                        pos = 0;
                    }
                    ios.writeByte(0);
                    pos++;
View Full Code Here

                    pos++;
                } while (--numReps >= 0);
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                try { ios.reset(); } catch (IOException e) {}
            }
        }
    }

    private static class IOSWriteShort extends OutputStreamTests {
View Full Code Here

            int pos = 0;
            try {
                ios.mark();
                do {
                    if (pos + 2 > length) {
                        ios.reset();
                        ios.mark();
                        pos = 0;
                    }
                    ios.writeShort(0);
                    pos += 2;
View Full Code Here

                    pos += 2;
                } while (--numReps >= 0);
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                try { ios.reset(); } catch (IOException e) {}
            }
        }
    }

    private static class IOSWriteInt extends OutputStreamTests {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.