langtools/src/share/classes/com/sun/tools/javac/file/ZipArchive.java
changeset 3998 c66be272f350
parent 3890 b53fced26fa4
parent 3995 73af8b6fb8bc
child 4073 9788f4549740
--- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipArchive.java	Wed Jul 05 17:01:15 2017 +0200
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipArchive.java	Fri Sep 25 22:04:43 2009 -0700
@@ -147,51 +147,37 @@
             this.entry = entry;
         }
 
+        public URI toUri() {
+            File zipFile = new File(zarch.zdir.getName());
+            return createJarUri(zipFile, entry.getName());
+        }
+
+        @Override
+        public String getName() {
+            return zarch.zdir.getName() + "(" + entry.getName() + ")";
+        }
+
+        @Override
+        public String getShortName() {
+            return new File(zarch.zdir.getName()).getName() + "(" + entry + ")";
+        }
+
+        @Override
+        public JavaFileObject.Kind getKind() {
+            return getKind(entry.getName());
+        }
+
+        @Override
         public InputStream openInputStream() throws IOException {
             return zarch.zdir.getInputStream(entry);
         }
 
+        @Override
         public OutputStream openOutputStream() throws IOException {
             throw new UnsupportedOperationException();
         }
 
         @Override
-        protected CharsetDecoder getDecoder(boolean ignoreEncodingErrors) {
-            return fileManager.getDecoder(fileManager.getEncodingName(), ignoreEncodingErrors);
-        }
-
-        public Writer openWriter() throws IOException {
-            throw new UnsupportedOperationException();
-        }
-
-        @Deprecated
-        public String getName() {
-            return name;
-        }
-
-        public boolean isNameCompatible(String cn, JavaFileObject.Kind k) {
-            cn.getClass();
-            // null check
-            if (k == Kind.OTHER && getKind() != k) {
-                return false;
-            }
-            return name.equals(cn + k.extension);
-        }
-
-        @Deprecated
-        @Override
-        public String getPath() {
-            return zarch.zdir.getName() + "(" + entry + ")";
-        }
-
-        public long getLastModified() {
-            return entry.getTime();
-        }
-
-        public boolean delete() {
-            throw new UnsupportedOperationException();
-        }
-
         public CharBuffer getCharContent(boolean ignoreEncodingErrors) throws IOException {
             CharBuffer cb = fileManager.getCachedContent(this);
             if (cb == null) {
@@ -216,6 +202,42 @@
         }
 
         @Override
+        public Writer openWriter() throws IOException {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public long getLastModified() {
+            return entry.getTime();
+        }
+
+        @Override
+        public boolean delete() {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        protected CharsetDecoder getDecoder(boolean ignoreEncodingErrors) {
+            return fileManager.getDecoder(fileManager.getEncodingName(), ignoreEncodingErrors);
+        }
+
+        @Override
+        protected String inferBinaryName(Iterable<? extends File> path) {
+            String entryName = entry.getName();
+            return removeExtension(entryName).replace('/', '.');
+        }
+
+        @Override
+        public boolean isNameCompatible(String cn, JavaFileObject.Kind k) {
+            cn.getClass();
+            // null check
+            if (k == Kind.OTHER && getKind() != k) {
+                return false;
+            }
+            return name.equals(cn + k.extension);
+        }
+
+        @Override
         public boolean equals(Object other) {
             if (!(other instanceof ZipFileObject)) {
                 return false;
@@ -228,25 +250,6 @@
         public int hashCode() {
             return zarch.zdir.hashCode() + name.hashCode();
         }
-
-        public String getZipName() {
-            return zarch.zdir.getName();
-        }
-
-        public String getZipEntryName() {
-            return entry.getName();
-        }
-
-        public URI toUri() {
-            File zipFile = new File(getZipName());
-            return createJarUri(zipFile, entry.getName());
-        }
-
-        @Override
-        protected String inferBinaryName(Iterable<? extends File> path) {
-            String entryName = getZipEntryName();
-            return removeExtension(entryName).replace('/', '.');
-        }
     }
 
 }