1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 only, as
8  * published by the Free Software Foundation.  Oracle designates this
9  * particular file as subject to the "Classpath" exception as provided
10  * by Oracle in the LICENSE file that accompanied this code.
11  *
12  * This code is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15  * version 2 for more details (a copy is included in the LICENSE file that
16  * accompanied this code).
17  *
18  * You should have received a copy of the GNU General Public License version
19  * 2 along with this work; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21  *
22  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23  * or visit www.oracle.com if you need additional information or have any
24  * questions.
25  */
26 
27 package java.util.zip;
28 
29 import android.compat.annotation.UnsupportedAppUsage;
30 
31 @SuppressWarnings({"unchecked", "deprecation", "all"})
32 public class ZipOutputStream extends java.util.zip.DeflaterOutputStream
33         implements java.util.zip.ZipConstants {
34 
ZipOutputStream(java.io.OutputStream out)35     public ZipOutputStream(java.io.OutputStream out) {
36         super((java.io.OutputStream) null);
37         throw new RuntimeException("Stub!");
38     }
39 
ZipOutputStream(java.io.OutputStream out, java.nio.charset.Charset charset)40     public ZipOutputStream(java.io.OutputStream out, java.nio.charset.Charset charset) {
41         super((java.io.OutputStream) null);
42         throw new RuntimeException("Stub!");
43     }
44 
version(java.util.zip.ZipEntry e)45     private static int version(java.util.zip.ZipEntry e) throws java.util.zip.ZipException {
46         throw new RuntimeException("Stub!");
47     }
48 
ensureOpen()49     private void ensureOpen() throws java.io.IOException {
50         throw new RuntimeException("Stub!");
51     }
52 
setComment(java.lang.String comment)53     public void setComment(java.lang.String comment) {
54         throw new RuntimeException("Stub!");
55     }
56 
setMethod(int method)57     public void setMethod(int method) {
58         throw new RuntimeException("Stub!");
59     }
60 
setLevel(int level)61     public void setLevel(int level) {
62         throw new RuntimeException("Stub!");
63     }
64 
putNextEntry(java.util.zip.ZipEntry e)65     public void putNextEntry(java.util.zip.ZipEntry e) throws java.io.IOException {
66         throw new RuntimeException("Stub!");
67     }
68 
closeEntry()69     public void closeEntry() throws java.io.IOException {
70         throw new RuntimeException("Stub!");
71     }
72 
write(byte[] b, int off, int len)73     public synchronized void write(byte[] b, int off, int len) throws java.io.IOException {
74         throw new RuntimeException("Stub!");
75     }
76 
finish()77     public void finish() throws java.io.IOException {
78         throw new RuntimeException("Stub!");
79     }
80 
close()81     public void close() throws java.io.IOException {
82         throw new RuntimeException("Stub!");
83     }
84 
writeLOC(java.util.zip.ZipOutputStream.XEntry xentry)85     private void writeLOC(java.util.zip.ZipOutputStream.XEntry xentry) throws java.io.IOException {
86         throw new RuntimeException("Stub!");
87     }
88 
writeEXT(java.util.zip.ZipEntry e)89     private void writeEXT(java.util.zip.ZipEntry e) throws java.io.IOException {
90         throw new RuntimeException("Stub!");
91     }
92 
writeCEN(java.util.zip.ZipOutputStream.XEntry xentry)93     private void writeCEN(java.util.zip.ZipOutputStream.XEntry xentry) throws java.io.IOException {
94         throw new RuntimeException("Stub!");
95     }
96 
writeEND(long off, long len)97     private void writeEND(long off, long len) throws java.io.IOException {
98         throw new RuntimeException("Stub!");
99     }
100 
getExtraLen(byte[] extra)101     private int getExtraLen(byte[] extra) {
102         throw new RuntimeException("Stub!");
103     }
104 
writeExtra(byte[] extra)105     private void writeExtra(byte[] extra) throws java.io.IOException {
106         throw new RuntimeException("Stub!");
107     }
108 
writeByte(int v)109     private void writeByte(int v) throws java.io.IOException {
110         throw new RuntimeException("Stub!");
111     }
112 
writeShort(int v)113     private void writeShort(int v) throws java.io.IOException {
114         throw new RuntimeException("Stub!");
115     }
116 
writeInt(long v)117     private void writeInt(long v) throws java.io.IOException {
118         throw new RuntimeException("Stub!");
119     }
120 
writeLong(long v)121     private void writeLong(long v) throws java.io.IOException {
122         throw new RuntimeException("Stub!");
123     }
124 
writeBytes(byte[] b, int off, int len)125     private void writeBytes(byte[] b, int off, int len) throws java.io.IOException {
126         throw new RuntimeException("Stub!");
127     }
128 
129     public static final int DEFLATED = 8; // 0x8
130 
131     public static final int STORED = 0; // 0x0
132 
133     private boolean closed = false;
134 
135     private byte[] comment;
136 
137     private java.util.zip.CRC32 crc;
138 
139     private java.util.zip.ZipOutputStream.XEntry current;
140 
141     private boolean finished;
142 
143     private static final boolean inhibitZip64 = false;
144 
145     private long locoff = 0; // 0x0
146 
147     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
148     private int method = 8; // 0x8
149 
150     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
151     private java.util.HashSet<java.lang.String> names;
152 
153     @UnsupportedAppUsage
154     private long written = 0; // 0x0
155 
156     private java.util.Vector<java.util.zip.ZipOutputStream.XEntry> xentries;
157 
158     private final java.util.zip.ZipCoder zc;
159 
160     {
161         zc = null;
162     }
163 
164     @SuppressWarnings({"unchecked", "deprecation", "all"})
165     private static class XEntry {
166 
XEntry(java.util.zip.ZipEntry entry, long offset)167         public XEntry(java.util.zip.ZipEntry entry, long offset) {
168             throw new RuntimeException("Stub!");
169         }
170 
171         final java.util.zip.ZipEntry entry;
172 
173         {
174             entry = null;
175         }
176 
177         final long offset;
178 
179         {
180             offset = 0;
181         }
182     }
183 }
184