Package zmq

Class Msg.Builder

  • Enclosing class:
    Msg

    public static final class Msg.Builder
    extends Msg
    • Field Detail

      • out

        private final java.io.ByteArrayOutputStream out
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • size

        public int size()
        Overrides:
        size in class Msg
      • put

        protected Msg put​(int index,
                          byte b)
        Overrides:
        put in class Msg
      • put

        public Msg put​(byte[] src,
                       int off,
                       int len)
        Overrides:
        put in class Msg
      • put

        public Msg put​(java.nio.ByteBuffer src,
                       int off,
                       int len)
        Overrides:
        put in class Msg
      • putShortString

        public Msg putShortString​(java.lang.String data)
        Description copied from class: Msg
        Puts a string into the message, prefixed with its length. Users shall size the message by adding 1 to the length of the string: It needs to be able to accommodate (data.length+1) more bytes.
        Overrides:
        putShortString in class Msg
        Parameters:
        data - a string shorter than 256 characters. If null, defaults to a no-op.
        Returns:
        the same message.
      • setFlags

        public void setFlags​(int flags)
        Overrides:
        setFlags in class Msg
      • build

        public Msg build()