| 182 | } |
| 183 | |
| 184 | public HostEntryHolder putNextHostEntry(String name, ZipFile zipFile) throws IOException { |
| 185 | if (name.endsWith("/") || name.endsWith("\\")) { |
| 186 | throw new IOException("Invalid host entry name: " + name); |
| 187 | } |
| 188 | int savedMethod = method; |
| 189 | method = METHOD_STORED; |
| 190 | CenterFileHeader centerFileHeader = new CenterFileHeader(name); |
| 191 | centerFileHeader.isHost = true; |
| 192 | putNextEntry(centerFileHeader); |
| 193 | method = savedMethod; |
| 194 | return new HostEntryHolder(zipFile); |
| 195 | } |
| 196 | |
| 197 | public class HostEntryHolder { |
| 198 | private final CenterFileHeader hostHeader; |