equal
deleted
inserted
replaced
120 |
120 |
121 public void close() throws IOException { |
121 public void close() throws IOException { |
122 zdir.close(); |
122 zdir.close(); |
123 } |
123 } |
124 |
124 |
|
125 @Override |
125 public String toString() { |
126 public String toString() { |
126 return "ZipArchive[" + zdir.getName() + "]"; |
127 return "ZipArchive[" + zdir.getName() + "]"; |
127 } |
128 } |
128 |
129 |
129 protected JavacFileManager fileManager; |
130 protected JavacFileManager fileManager; |
152 |
153 |
153 public OutputStream openOutputStream() throws IOException { |
154 public OutputStream openOutputStream() throws IOException { |
154 throw new UnsupportedOperationException(); |
155 throw new UnsupportedOperationException(); |
155 } |
156 } |
156 |
157 |
|
158 @Override |
157 protected CharsetDecoder getDecoder(boolean ignoreEncodingErrors) { |
159 protected CharsetDecoder getDecoder(boolean ignoreEncodingErrors) { |
158 return fileManager.getDecoder(fileManager.getEncodingName(), ignoreEncodingErrors); |
160 return fileManager.getDecoder(fileManager.getEncodingName(), ignoreEncodingErrors); |
159 } |
161 } |
160 |
162 |
161 public Writer openWriter() throws IOException { |
163 public Writer openWriter() throws IOException { |
175 } |
177 } |
176 return name.equals(cn + k.extension); |
178 return name.equals(cn + k.extension); |
177 } |
179 } |
178 |
180 |
179 @Deprecated |
181 @Deprecated |
|
182 @Override |
180 public String getPath() { |
183 public String getPath() { |
181 return zarch.zdir.getName() + "(" + entry + ")"; |
184 return zarch.zdir.getName() + "(" + entry + ")"; |
182 } |
185 } |
183 |
186 |
184 public long getLastModified() { |
187 public long getLastModified() { |
233 public String getZipEntryName() { |
236 public String getZipEntryName() { |
234 return entry.getName(); |
237 return entry.getName(); |
235 } |
238 } |
236 |
239 |
237 public URI toUri() { |
240 public URI toUri() { |
238 String zipName = new File(getZipName()).toURI().normalize().getPath(); |
241 File zipFile = new File(getZipName()); |
239 String entryName = getZipEntryName(); |
242 return createJarUri(zipFile, entry.getName()); |
240 return URI.create("jar:" + zipName + "!" + entryName); |
|
241 } |
243 } |
242 |
244 |
243 @Override |
245 @Override |
244 protected String inferBinaryName(Iterable<? extends File> path) { |
246 protected String inferBinaryName(Iterable<? extends File> path) { |
245 String entryName = getZipEntryName(); |
247 String entryName = getZipEntryName(); |