XrefWriter.java revision 1384
352N/A * The contents of this file are subject to the terms of the 352N/A * Common Development and Distribution License (the "License"). 352N/A * You may not use this file except in compliance with the License. 352N/A * language governing permissions and limitations under the License. 352N/A * When distributing Covered Code, include this CDDL HEADER in each 352N/A * If applicable, add the following below this CDDL HEADER, with the 352N/A * fields enclosed by brackets "[]" replaced with your own identifying 352N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1054N/A * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 352N/A * Portions Copyright 2012 Jens Elkner. 665N/A * An UTF-8 OutputStreamWriter used to write Xref files. 352N/A * file with the given name. 352N/A * @param genre the genre of the data to be written. 352N/A * file with the given name. 352N/A * @param genre the genre of the data to be written. 367N/A * @param compress if {@code true} written data gets compressed. 352N/A * @param file file to write 352N/A * @param genre the genre of the data to be written. 365N/A // prevent wrapper streams from closing it 1054N/A * @param file file to write 1054N/A * @param genre the genre of the data to be written. 1054N/A * @param compress if {@code true} written data gets compressed. 480N/A * @throws FileNotFoundException 480N/A * @see FileOutputStream 480N/A * Just wraps the given writer. {@link #close()} on this instance gets 480N/A * ignored and thus no header will be written or updated. 480N/A * @param out writer to wrap. 665N/A * Get the number of bytes written to the output stream. 665N/A * @return a number >= 0 665N/A * @see FileChannel#position() 592N/A * Get the file this instance is writing to. 480N/A * @return {@code null} if this instance wraps another writer, the file 480N/A * used to create this instance otherwise. 560N/A * Remember the number of characters currently written to the underlying 593N/A * output stream. NOTE: This method is unsynchronized and thus may return 678N/A * an unexpected value if characters are written concurrently! 593N/A * @return the value of {@link #getCount()} 593N/A * Get the number of characters written to the underlying 593N/A * output stream at the last time when {@link #mark()} was called. 593N/A * @return {@code -1} if {@code mark()} has never been called, otherwise 593N/A * the value the last {@code mark()} returned. 876N/A * Set the number of lines written to this stream. 876N/A * @param lines number of lines writen.