Package javax.jmdns.impl
Class DNSOutgoing.MessageOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.ByteArrayOutputStream
-
- javax.jmdns.impl.DNSOutgoing.MessageOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
- Enclosing class:
- DNSOutgoing
public static class DNSOutgoing.MessageOutputStream extends java.io.ByteArrayOutputStream
-
-
Field Summary
Fields Modifier and Type Field Description private int_offsetprivate DNSOutgoing_out
-
Constructor Summary
Constructors Constructor Description MessageOutputStream(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static intindexOfSeparator(java.lang.String aName)(package private) voidwriteByte(int value)voidwriteBytes(byte[] data)(package private) voidwriteBytes(byte[] data, int off, int len)(package private) voidwriteBytes(java.lang.String str, int off, int len)(package private) voidwriteInt(int value)(package private) voidwriteName(java.lang.String name)(package private) voidwriteName(java.lang.String name, boolean useCompression)(package private) voidwriteQuestion(DNSQuestion question)(package private) voidwriteRecord(DNSRecord rec, long now)(package private) voidwriteShort(int value)(package private) voidwriteUTF(java.lang.String str, int off, int len)
-
-
-
Field Detail
-
_out
private final DNSOutgoing _out
-
_offset
private final int _offset
-
-
Constructor Detail
-
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:
java.lang.IllegalArgumentException- if size is negative.
-
MessageOutputStream
MessageOutputStream(int size, DNSOutgoing out, int offset)
-
-
Method Detail
-
writeByte
void writeByte(int value)
-
writeBytes
void writeBytes(java.lang.String str, int off, int len)
-
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
void writeUTF(java.lang.String str, int off, int len)
-
writeName
void writeName(java.lang.String name)
-
writeName
void writeName(java.lang.String name, boolean useCompression)
-
indexOfSeparator
private static int indexOfSeparator(java.lang.String aName)
-
writeQuestion
void writeQuestion(DNSQuestion question)
-
writeRecord
void writeRecord(DNSRecord rec, long now)
-
-