Class MessageOutput
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.tools.io.MessageOutput
-
public class MessageOutput extends java.lang.ObjectAn output for a series of messages which each have sizes specified before the start of the message. Even when the decoder does not recognize some of the messages, it can skip over the message since it knows its size in advance.
-
-
Constructor Summary
Constructors Constructor Description MessageOutput(java.io.OutputStream outputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommitMessage()Commit previously started message to the underlying output stream.voidcommitMessage(int flags)Commit previously started message to the underlying output stream.voidfinish()Write an end marker to the stream so that decoder knows to return null at this position.java.io.DataOutputstartMessage()
-
-
-
Method Detail
-
startMessage
public java.io.DataOutput startMessage()
- Returns:
- Data output for a new message
-
commitMessage
public void commitMessage() throws java.io.IOExceptionCommit previously started message to the underlying output stream.- Throws:
java.io.IOException- On IO error
-
commitMessage
public void commitMessage(int flags) throws java.io.IOExceptionCommit previously started message to the underlying output stream.- Parameters:
flags- Flags to use when committing the message (0-3).- Throws:
java.io.IOException- On IO error
-
finish
public void finish() throws java.io.IOExceptionWrite an end marker to the stream so that decoder knows to return null at this position.- Throws:
java.io.IOException- On IO error
-
-