553N/A * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 553N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 553N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 553N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Provides simple implementations for most methods in JavaFileObject. 0N/A * This class is designed to be subclassed and used as a basis for 0N/A * JavaFileObject implementations. Subclasses can override the 0N/A * implementation and specification of any method of this class as 0N/A * long as the general contract of JavaFileObject is obeyed. 0N/A * @author Peter von der Ahé 0N/A * A URI for this file object. 0N/A * The kind of this file object. 0N/A * Construct a SimpleJavaFileObject of the given kind and with the 0N/A * @param uri the URI for this file object 0N/A * @param kind the kind of this file object 0N/A * This implementation always throws {@linkplain 0N/A * UnsupportedOperationException}. Subclasses can change this 0N/A * behavior as long as the contract of {@link FileObject} is 0N/A * This implementation always throws {@linkplain 0N/A * UnsupportedOperationException}. Subclasses can change this 0N/A * behavior as long as the contract of {@link FileObject} is 0N/A * Wraps the result of {@linkplain #getCharContent} in a Reader. 0N/A * Subclasses can change this behavior as long as the contract of 0N/A * {@link FileObject} is obeyed. 0N/A * @param ignoreEncodingErrors {@inheritDoc} 0N/A * @return a Reader wrapping the result of getCharContent 0N/A * @throws IllegalStateException {@inheritDoc} 0N/A * @throws UnsupportedOperationException {@inheritDoc} 0N/A * @throws IOException {@inheritDoc} 0N/A * This implementation always throws {@linkplain 0N/A * UnsupportedOperationException}. Subclasses can change this 0N/A * behavior as long as the contract of {@link FileObject} is 0N/A * Wraps the result of openOutputStream in a Writer. Subclasses 0N/A * can change this behavior as long as the contract of {@link 0N/A * FileObject} is obeyed. 0N/A * @return a Writer wrapping the result of openOutputStream 0N/A * @throws IllegalStateException {@inheritDoc} 0N/A * @throws UnsupportedOperationException {@inheritDoc} 0N/A * @throws IOException {@inheritDoc} 0N/A * This implementation returns {@code 0L}. Subclasses can change 0N/A * this behavior as long as the contract of {@link FileObject} is 0N/A * @return {@code 0L} 0N/A * This implementation does nothing. Subclasses can change this 0N/A * behavior as long as the contract of {@link FileObject} is 0N/A * @return {@code false} 0N/A * @return {@code this.kind} 0N/A * This implementation compares the path of its URI to the given 0N/A * simple name. This method returns true if the given kind is 0N/A * equal to the kind of this object, and if the path is equal to 0N/A * {@code simpleName + kind.extension} or if it ends with {@code 0N/A * "/" + simpleName + kind.extension}. 0N/A * <p>This method calls {@link #getKind} and {@link #toUri} and 0N/A * does not access the fields {@link #uri} and {@link #kind} 0N/A * <p>Subclasses can change this behavior as long as the contract 0N/A * of {@link JavaFileObject} is obeyed. 0N/A * This implementation returns {@code null}. Subclasses can 0N/A * change this behavior as long as the contract of 0N/A * {@link JavaFileObject} is obeyed. 0N/A * This implementation returns {@code null}. Subclasses can 0N/A * change this behavior as long as the contract of 0N/A * {@link JavaFileObject} is obeyed.