Class Input

  • All Implemented Interfaces:
    Input

    public class Input
    extends Input
    implements Input
    Input for Red5 data (AMF3) types
    Author:
    The Red5 Project, Luke Hubbard, Codegent Ltd (luke@codegent.com), Joachim Bauch (jojo@struktur.de)
    • Constructor Detail

      • Input

        public Input​(org.apache.mina.core.buffer.IoBuffer buf)
        Creates Input object for AMF3 from byte buffer
        Parameters:
        buf - Byte buffer
      • Input

        public Input​(org.apache.mina.core.buffer.IoBuffer buf,
                     Input.RefStorage refStorage)
        Creates Input object for AMF3 from byte buffer and initializes references from passed RefStorage
        Parameters:
        buf - buffer
        refStorage - ref storage
    • Method Detail

      • enforceAMF3

        public void enforceAMF3()
        Force using AMF3 everywhere
      • getBuffer

        protected org.apache.mina.core.buffer.IoBuffer getBuffer()
        Provide access to raw data.
        Returns:
        IoBuffer
      • readDataType

        public byte readDataType()
        Reads the data type
        Specified by:
        readDataType in interface Input
        Overrides:
        readDataType in class Input
        Returns:
        byte Data type
        See Also:
        AMF
      • readNull

        public Object readNull()
        Reads a null (value)
        Specified by:
        readNull in interface Input
        Overrides:
        readNull in class Input
        Returns:
        Object null
      • readString

        public String readString​(int length)
        Reads a string of a set length. This does not use the string reference table.
        Parameters:
        length - the length of the string
        Returns:
        String
      • getString

        public String getString()
        Description copied from class: Input
        Reads string from buffer
        Specified by:
        getString in interface Input
        Overrides:
        getString in class Input
        Returns:
        String
      • readDate

        public Date readDate()
        Returns a date
        Specified by:
        readDate in interface Input
        Overrides:
        readDate in class Input
        Returns:
        Date Date object
      • readArray

        public Object readArray​(Type target)
        Returns an array
        Specified by:
        readArray in interface Input
        Overrides:
        readArray in class Input
        Parameters:
        target - target type
        Returns:
        int Length of array
      • readMap

        public Object readMap()
        Description copied from interface: Input
        Read a map containing key - value pairs. This can result in a List or Map being deserialized depending on the map type found.
        Specified by:
        readMap in interface Input
        Overrides:
        readMap in class Input
        Returns:
        Map
      • reset

        public void reset()
        Resets internals.
        Specified by:
        reset in interface Input
        Overrides:
        reset in class Input