Path: blob/master/src/java.rmi/share/classes/sun/rmi/log/LogOutputStream.java
41155 views
/*1* Copyright (c) 1997, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package sun.rmi.log;2627import java.io.*;2829public30class LogOutputStream extends OutputStream {3132private RandomAccessFile raf;3334/**35* Creates an output file with the specified system dependent36* file descriptor.37* @param raf the system dependent file descriptor.38* @exception IOException If an I/O error has occurred.39*/40public LogOutputStream(RandomAccessFile raf) throws IOException {41this.raf = raf;42}4344/**45* Writes a byte of data. This method will block until the byte is46* actually written.47* @param b the byte to be written48* @exception IOException If an I/O error has occurred.49*/50public void write(int b) throws IOException {51raf.write(b);52}5354/**55* Writes an array of bytes. Will block until the bytes56* are actually written.57* @param b the data to be written58* @exception IOException If an I/O error has occurred.59*/60public void write(byte b[]) throws IOException {61raf.write(b);62}6364/**65* Writes a sub array of bytes.66* @param b the data to be written67* @param off the start offset in the data68* @param len the number of bytes that are written69* @exception IOException If an I/O error has occurred.70*/71public void write(byte b[], int off, int len) throws IOException {72raf.write(b, off, len);73}7475/**76* Can not close a LogOutputStream, so this does nothing.77* @exception IOException If an I/O error has occurred.78*/79public final void close() throws IOException {80}8182}838485