System.IO
Class BinaryWriter
java.lang.Object
System.IO.BinaryWriter
- All Implemented Interfaces:
- IDisposable
- Direct Known Subclasses:
- PacketWriter
public class BinaryWriter
- extends java.lang.Object
- implements IDisposable
Writes primitive types in binary to a stream and supports writing strings in a specific encoding.
- Author:
- Halofreak1990
Method Summary |
void |
Close()
|
void |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
protected void |
Dispose(boolean disposing)
|
void |
Flush()
|
Stream |
getBaseStream()
|
void |
Write(boolean value)
|
void |
Write(byte value)
|
void |
Write(byte[] buffer)
|
void |
Write(int value)
|
void |
Write(long value)
|
void |
Write(short value)
|
void |
Write(java.lang.String value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Null
public static final BinaryWriter Null
OutStream
protected Stream OutStream
BinaryWriter
protected BinaryWriter()
BinaryWriter
public BinaryWriter(Stream output)
- Parameters:
output
-
BinaryWriter
public BinaryWriter(Stream output,
java.lang.String encoding)
- Parameters:
output
- encoding
-
getBaseStream
public Stream getBaseStream()
Close
public void Close()
Dispose
public void Dispose()
- Description copied from interface:
IDisposable
- Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
- Specified by:
Dispose
in interface IDisposable
Dispose
protected void Dispose(boolean disposing)
- Parameters:
disposing
-
Flush
public void Flush()
Write
public void Write(boolean value)
- Parameters:
value
-
Write
public void Write(byte value)
- Parameters:
value
-
Write
public void Write(byte[] buffer)
- Parameters:
buffer
-
Write
public void Write(short value)
- Parameters:
value
-
Write
public void Write(int value)
- Parameters:
value
-
Write
public void Write(long value)
- Parameters:
value
-
Write
public void Write(java.lang.String value)
- Parameters:
value
-