Package ej.rcommand

Interface CommandSender

    • Method Detail

      • startCommand

        void startCommand​(String command)
        Starts a command.

        A command can be followed by arguments.

        Parameters:
        command - the command name.
      • sendString

        void sendString​(String string)
        Sends a string parameter.
        Parameters:
        string - the string to send.
      • sendLong

        void sendLong​(long l)
        Sends a long parameter.
        Parameters:
        l - the long to send.
      • sendInt

        void sendInt​(int i)
        Sends an integer parameter.
        Parameters:
        i - the integer to send.
      • sendFloat

        void sendFloat​(float f)
        Sends a float parameter.
        Parameters:
        f - the float to send.
      • sendDouble

        void sendDouble​(double d)
        Sends a double parameter.
        Parameters:
        d - the double to send.
      • sendBoolean

        void sendBoolean​(boolean b)
        Sends a boolean parameter.
        Parameters:
        b - the boolean to send.
      • sendByteArray

        void sendByteArray​(byte[] a)
        Sends a byte array parameter.
        Parameters:
        a - the byte array to send.
      • sendByteArray

        void sendByteArray​(byte[] buffer,
                           int offset,
                           int length)
        Sends a byte array parameter with offset and length.
        Parameters:
        buffer - the byte array to send.
        offset - offset in the byte array.
        length - data length to send.
      • sendInputStream

        void sendInputStream​(InputStream is)
        Sends an input stream.
        Parameters:
        is - the input stream to send.
      • flushCommand

        void flushCommand()
        Ends the command frame.
      • getOutputStream

        @Nullable
        OutputStream getOutputStream()
        Get the OuputStream used by the instance.
        Returns:
        the OuputStream used by the instance, or null if this command sender is not ready to send a command.
      • getInputStream

        @Nullable
        InputStream getInputStream()
        Get the InputStream used by the instance.
        Returns:
        the InputStream used by the instance, or null if this command sender is not ready to send a command.