public interface CommandSender
Modifier and Type | Method and Description |
---|---|
void |
flushCommand()
Ends the command frame.
|
InputStream |
getInputStream()
Get the InputStream used by the instance.
|
OutputStream |
getOutputStream()
Get the OuputStream used by the instance.
|
void |
sendBoolean(boolean b)
Sends a boolean parameter.
|
void |
sendByteArray(byte[] a)
Sends a byte array parameter.
|
void |
sendByteArray(byte[] buffer,
int offset,
int length)
Sends a byte array parameter with offset and length.
|
void |
sendDouble(double d)
Sends a double parameter.
|
void |
sendFloat(float f)
Sends a float parameter.
|
void |
sendInputStream(InputStream is)
Sends an input stream.
|
void |
sendInt(int i)
Sends an integer parameter.
|
void |
sendLong(long l)
Sends a long parameter.
|
void |
sendString(String string)
Sends a string parameter.
|
void |
startCommand(String command)
Starts a command.
|
void flushCommand()
@Nullable InputStream getInputStream()
null
if this command sender is not ready to send a
command.@Nullable OutputStream getOutputStream()
null
if this command sender is not ready to send a
command.void sendBoolean(boolean b)
b
- the boolean to send.void sendByteArray(byte[] a)
a
- the byte array to send.void sendByteArray(byte[] buffer, int offset, int length)
buffer
- the byte array to send.offset
- offset in the byte array.length
- data length to send.void sendDouble(double d)
d
- the double to send.void sendFloat(float f)
f
- the float to send.void sendInputStream(InputStream is)
is
- the input stream to send.void sendInt(int i)
i
- the integer to send.void sendLong(long l)
l
- the long to send.void sendString(String string)
string
- the string to send.void startCommand(String command)
A command can be followed by arguments.
command
- the command name.