Package javax.jmdns.impl
Class DNSOutgoing.MessageOutputStream
java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
javax.jmdns.impl.DNSOutgoing.MessageOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Enclosing class:
DNSOutgoing
-
Field Summary
FieldsFields inherited from class java.io.ByteArrayOutputStream
buf, count
-
Constructor Summary
ConstructorsConstructorDescriptionMessageOutputStream
(int size, DNSOutgoing out) Creates a new message stream, with a buffer capacity of the specified size, in bytes.MessageOutputStream
(int size, DNSOutgoing out, int offset) -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
indexOfSeparator
(String aName) (package private) void
writeByte
(int value) void
writeBytes
(byte[] data) (package private) void
writeBytes
(byte[] data, int off, int len) (package private) void
writeBytes
(String str, int off, int len) (package private) void
writeInt
(int value) (package private) void
(package private) void
(package private) void
writeQuestion
(DNSQuestion question) (package private) void
writeRecord
(DNSRecord rec, long now) (package private) void
writeShort
(int value) (package private) void
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo
Methods inherited from class java.io.OutputStream
flush, write
-
Field Details
-
_out
-
_offset
private final int _offset
-
-
Constructor Details
-
MessageOutputStream
MessageOutputStream(int size, DNSOutgoing out) Creates a new message stream, with a buffer capacity of the specified size, in bytes.- Parameters:
size
- the initial size.- Throws:
IllegalArgumentException
- if size is negative.
-
MessageOutputStream
MessageOutputStream(int size, DNSOutgoing out, int offset)
-
-
Method Details
-
writeByte
void writeByte(int value) -
writeBytes
-
writeBytes
public void writeBytes(byte[] data) -
writeBytes
void writeBytes(byte[] data, int off, int len) -
writeShort
void writeShort(int value) -
writeInt
void writeInt(int value) -
writeUTF
-
writeName
-
writeName
-
indexOfSeparator
-
writeQuestion
-
writeRecord
-