Java Code Examples for java.util.zip.CheckedOutputStream#flush()
The following examples show how to use
java.util.zip.CheckedOutputStream#flush() .
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: ZipMeUp.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
static byte[] getManifestAsBytes(int nchars) throws IOException { crc.reset(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); CheckedOutputStream cos = new CheckedOutputStream(baos, crc); PrintStream ps = new PrintStream(cos); ps.println("Manifest-Version: 1.0"); ps.print("Main-Class: "); for (int i = 0 ; i < nchars - SOME_KLASS.length() ; i++) { ps.print(i%10); } ps.println(SOME_KLASS); cos.flush(); cos.close(); ps.close(); return baos.toByteArray(); }
Example 2
Source File: ZipMeUp.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
static byte[] getManifestAsBytes(int nchars) throws IOException { crc.reset(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); CheckedOutputStream cos = new CheckedOutputStream(baos, crc); PrintStream ps = new PrintStream(cos); ps.println("Manifest-Version: 1.0"); ps.print("Main-Class: "); for (int i = 0 ; i < nchars - SOME_KLASS.length() ; i++) { ps.print(i%10); } ps.println(SOME_KLASS); cos.flush(); cos.close(); ps.close(); return baos.toByteArray(); }
Example 3
Source File: ZipMeUp.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
static byte[] getManifestAsBytes(int nchars) throws IOException { crc.reset(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); CheckedOutputStream cos = new CheckedOutputStream(baos, crc); PrintStream ps = new PrintStream(cos); ps.println("Manifest-Version: 1.0"); ps.print("Main-Class: "); for (int i = 0 ; i < nchars - SOME_KLASS.length() ; i++) { ps.print(i%10); } ps.println(SOME_KLASS); cos.flush(); cos.close(); ps.close(); return baos.toByteArray(); }
Example 4
Source File: ZipMeUp.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
static byte[] getManifestAsBytes(int nchars) throws IOException { crc.reset(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); CheckedOutputStream cos = new CheckedOutputStream(baos, crc); PrintStream ps = new PrintStream(cos); ps.println("Manifest-Version: 1.0"); ps.print("Main-Class: "); for (int i = 0 ; i < nchars - SOME_KLASS.length() ; i++) { ps.print(i%10); } ps.println(SOME_KLASS); cos.flush(); cos.close(); ps.close(); return baos.toByteArray(); }
Example 5
Source File: ZipMeUp.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
static byte[] getManifestAsBytes(int nchars) throws IOException { crc.reset(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); CheckedOutputStream cos = new CheckedOutputStream(baos, crc); PrintStream ps = new PrintStream(cos); ps.println("Manifest-Version: 1.0"); ps.print("Main-Class: "); for (int i = 0 ; i < nchars - SOME_KLASS.length() ; i++) { ps.print(i%10); } ps.println(SOME_KLASS); cos.flush(); cos.close(); ps.close(); return baos.toByteArray(); }
Example 6
Source File: ZipMeUp.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
static byte[] getManifestAsBytes(int nchars) throws IOException { crc.reset(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); CheckedOutputStream cos = new CheckedOutputStream(baos, crc); PrintStream ps = new PrintStream(cos); ps.println("Manifest-Version: 1.0"); ps.print("Main-Class: "); for (int i = 0 ; i < nchars - SOME_KLASS.length() ; i++) { ps.print(i%10); } ps.println(SOME_KLASS); cos.flush(); cos.close(); ps.close(); return baos.toByteArray(); }
Example 7
Source File: ZipMeUp.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
static byte[] getManifestAsBytes(int nchars) throws IOException { crc.reset(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); CheckedOutputStream cos = new CheckedOutputStream(baos, crc); PrintStream ps = new PrintStream(cos); ps.println("Manifest-Version: 1.0"); ps.print("Main-Class: "); for (int i = 0 ; i < nchars - SOME_KLASS.length() ; i++) { ps.print(i%10); } ps.println(SOME_KLASS); cos.flush(); cos.close(); ps.close(); return baos.toByteArray(); }
Example 8
Source File: ZipMeUp.java From hottub with GNU General Public License v2.0 | 6 votes |
static byte[] getManifestAsBytes(int nchars) throws IOException { crc.reset(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); CheckedOutputStream cos = new CheckedOutputStream(baos, crc); PrintStream ps = new PrintStream(cos); ps.println("Manifest-Version: 1.0"); ps.print("Main-Class: "); for (int i = 0 ; i < nchars - SOME_KLASS.length() ; i++) { ps.print(i%10); } ps.println(SOME_KLASS); cos.flush(); cos.close(); ps.close(); return baos.toByteArray(); }
Example 9
Source File: ZipMeUp.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
static byte[] getManifestAsBytes(int nchars) throws IOException { crc.reset(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); CheckedOutputStream cos = new CheckedOutputStream(baos, crc); PrintStream ps = new PrintStream(cos); ps.println("Manifest-Version: 1.0"); ps.print("Main-Class: "); for (int i = 0 ; i < nchars - SOME_KLASS.length() ; i++) { ps.print(i%10); } ps.println(SOME_KLASS); cos.flush(); cos.close(); ps.close(); return baos.toByteArray(); }
Example 10
Source File: ZipMeUp.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
static byte[] getManifestAsBytes(int nchars) throws IOException { crc.reset(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); CheckedOutputStream cos = new CheckedOutputStream(baos, crc); PrintStream ps = new PrintStream(cos); ps.println("Manifest-Version: 1.0"); ps.print("Main-Class: "); for (int i = 0 ; i < nchars - SOME_KLASS.length() ; i++) { ps.print(i%10); } ps.println(SOME_KLASS); cos.flush(); cos.close(); ps.close(); return baos.toByteArray(); }
Example 11
Source File: ZipMeUp.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
static byte[] getManifestAsBytes(int nchars) throws IOException { crc.reset(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); CheckedOutputStream cos = new CheckedOutputStream(baos, crc); PrintStream ps = new PrintStream(cos); ps.println("Manifest-Version: 1.0"); ps.print("Main-Class: "); for (int i = 0 ; i < nchars - SOME_KLASS.length() ; i++) { ps.print(i%10); } ps.println(SOME_KLASS); cos.flush(); cos.close(); ps.close(); return baos.toByteArray(); }
Example 12
Source File: ZipMeUp.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
static byte[] getManifestAsBytes(int nchars) throws IOException { crc.reset(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); CheckedOutputStream cos = new CheckedOutputStream(baos, crc); PrintStream ps = new PrintStream(cos); ps.println("Manifest-Version: 1.0"); ps.print("Main-Class: "); for (int i = 0 ; i < nchars - SOME_KLASS.length() ; i++) { ps.print(i%10); } ps.println(SOME_KLASS); cos.flush(); cos.close(); ps.close(); return baos.toByteArray(); }
Example 13
Source File: ZipMeUp.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
static byte[] getManifestAsBytes(int nchars) throws IOException { crc.reset(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); CheckedOutputStream cos = new CheckedOutputStream(baos, crc); PrintStream ps = new PrintStream(cos); ps.println("Manifest-Version: 1.0"); ps.print("Main-Class: "); for (int i = 0 ; i < nchars - SOME_KLASS.length() ; i++) { ps.print(i%10); } ps.println(SOME_KLASS); cos.flush(); cos.close(); ps.close(); return baos.toByteArray(); }