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 intindexOfSeparator(String aName) (package private) voidwriteByte(int value) voidwriteBytes(byte[] data) (package private) voidwriteBytes(byte[] data, int off, int len) (package private) voidwriteBytes(String str, int off, int len) (package private) voidwriteInt(int value) (package private) void(package private) void(package private) voidwriteQuestion(DNSQuestion question) (package private) voidwriteRecord(DNSRecord rec, long now) (package private) voidwriteShort(int value) (package private) voidMethods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, write, write, writeToMethods 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
-