< prev index next >
src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipPath.java
Print this page
rev 53038 : 8215472: (zipfs) Cleanups in implementation classes of jdk.zipfs and tests
*** 1,7 ****
/*
! * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 23,48 ****
* questions.
*/
package jdk.nio.zipfs;
! import java.io.*;
import java.net.URI;
! import java.nio.channels.*;
import java.nio.file.*;
import java.nio.file.DirectoryStream.Filter;
! import java.nio.file.attribute.*;
! import java.util.*;
import static java.nio.charset.StandardCharsets.UTF_8;
! import static java.nio.file.StandardOpenOption.*;
! import static java.nio.file.StandardCopyOption.*;
/**
! *
! * @author Xueming Shen, Rajendra Gutupalli,Jaya Hangal
*/
-
final class ZipPath implements Path {
private final ZipFileSystem zfs;
private final byte[] path;
private volatile int[] offsets;
--- 23,62 ----
* questions.
*/
package jdk.nio.zipfs;
! import java.io.File;
! import java.io.IOException;
! import java.io.InputStream;
! import java.io.OutputStream;
import java.net.URI;
! import java.nio.channels.FileChannel;
! import java.nio.channels.SeekableByteChannel;
import java.nio.file.*;
import java.nio.file.DirectoryStream.Filter;
! import java.nio.file.attribute.BasicFileAttributeView;
! import java.nio.file.attribute.FileAttribute;
! import java.nio.file.attribute.FileTime;
! import java.util.Arrays;
! import java.util.Iterator;
! import java.util.Map;
! import java.util.NoSuchElementException;
! import java.util.Objects;
! import java.util.Set;
!
import static java.nio.charset.StandardCharsets.UTF_8;
! import static java.nio.file.StandardCopyOption.COPY_ATTRIBUTES;
! import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
! import static java.nio.file.StandardOpenOption.CREATE;
! import static java.nio.file.StandardOpenOption.READ;
! import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING;
! import static java.nio.file.StandardOpenOption.WRITE;
/**
! * @author Xueming Shen, Rajendra Gutupalli,Jaya Hangal
*/
final class ZipPath implements Path {
private final ZipFileSystem zfs;
private final byte[] path;
private volatile int[] offsets;
*** 520,530 ****
}
private byte[] normalize(String path, int off, int len) {
StringBuilder to = new StringBuilder(len);
to.append(path, 0, off);
- int m = off;
char prevC = 0;
while (off < len) {
char c = path.charAt(off++);
if (c == '\\')
c = '/';
--- 534,543 ----
< prev index next >