org.apache.hadoop.io
Class DataOutputOutputStream
java.lang.Object
java.io.OutputStream
org.apache.hadoop.io.DataOutputOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
@InterfaceAudience.Public
@InterfaceStability.Unstable
public class DataOutputOutputStream
- extends OutputStream
OutputStream implementation that wraps a DataOutput.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
constructOutputStream
public static OutputStream constructOutputStream(DataOutput out)
- Construct an OutputStream from the given DataOutput. If 'out'
is already an OutputStream, simply returns it. Otherwise, wraps
it in an OutputStream.
- Parameters:
out
- the DataOutput to wrap
- Returns:
- an OutputStream instance that outputs to 'out'
write
public void write(int b)
throws IOException
- Specified by:
write
in class OutputStream
- Throws:
IOException
write
public void write(byte[] b,
int off,
int len)
throws IOException
- Overrides:
write
in class OutputStream
- Throws:
IOException
write
public void write(byte[] b)
throws IOException
- Overrides:
write
in class OutputStream
- Throws:
IOException
Copyright © 2013 Apache Software Foundation. All Rights Reserved.