/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Implementation of JavaFileObject using java.nio.file API.
*
* <p>PathFileObjects are, for the most part, straightforward wrappers around
* Path objects. The primary complexity is the support for "inferBinaryName".
* This is left as an abstract method, implemented by each of a number of
* different factory methods, which compute the binary name based on
* information available at the time the file object is created.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*/
/**
* Create a PathFileObject within a directory, such that the binary name
* can be inferred from the relationship to the parent directory.
*/
}
};
}
/**
* Create a PathFileObject in a file system such as a jar file, such that
* the binary name can be inferred from its position within the filesystem.
*/
return toBinaryName(path);
}
};
}
/**
* Create a PathFileObject whose binary name can be inferred from the
* relative path to a sibling.
*/
}
};
}
/**
* Create a PathFileObject whose binary name might be inferred from its
* position on a search path.
*/
try {
return toBinaryName(rp);
} catch (IllegalArgumentException e) {
// ignore this p if cannot relativize path to p
}
}
}
return null;
}
};
}
this.fileManager = fileManager;
}
/**
* Return the Path for this object.
* @return the Path for this object.
*/
return path;
}
}
// null check
return false;
}
return true;
}
try {
// allow for Windows
} catch (IOException e) {
}
}
return false;
}
return null;
}
return null;
}
}
}
}
fileManager.flushCache(this);
}
CharsetDecoder decoder = fileManager.getDecoder(fileManager.getEncodingName(), ignoreEncodingErrors);
}
try {
try {
} finally {
}
if (!ignoreEncodingErrors) {
}
} finally {
}
}
return cb;
}
fileManager.flushCache(this);
}
public long getLastModified() {
try {
} catch (IOException e) {
return -1;
}
}
public boolean delete() {
try {
return true;
} catch (IOException e) {
return false;
}
}
try {
} catch (IOException e) {
return false;
}
}
}
public int hashCode() {
}
}
}
private long size() {
try {
} catch (IOException e) {
return -1;
}
}
}
}
}
}