using System;

namespace FlexParser.AMF3
{
    /// <summary>
    /// The IDataInput interface provides a set of methods for reading binary data.
    /// </summary>
    public interface IDataInput
    {
        /// <summary>
        /// Reads a Boolean from the byte stream or byte array.
        /// </summary>
        /// <returns></returns>
        bool ReadBoolean();

        /// <summary>
        /// Reads a signed byte from the byte stream or byte array.
        /// </summary>
        /// <returns></returns>
        sbyte ReadSignedByte();

        /// <summary>
        /// Reads a signed 16-bit integer from the byte stream or byte array.
        /// </summary>
        /// <returns></returns>
        short ReadShort();

        /// <summary>
        /// Reads a signed 32-bit integer from the byte stream or byte array.
        /// </summary>
        /// <returns></returns>
        int ReadInt();

        /// <summary>
        /// Reads a signed 64-bit integer from the byte stream or byte array.
        /// </summary>
        /// <returns></returns>
        long ReadLong();

        /// <summary>
        /// Reads an unsigned byte from the byte stream or byte array.
        /// </summary>
        /// <returns></returns>
        byte ReadByte();

        /// <summary>
        /// Reads an unsigned 16-bit integer from the byte stream or byte array.
        /// </summary>
        /// <returns></returns>
        ushort ReadUnsignedShort();

        /// <summary>
        /// Reads an unsigned 32-bit integer from the byte stream or byte array.
        /// </summary>
        /// <returns></returns>
        uint ReadUnsignedInt();

        /// <summary>
        /// Reads an unsigned 64-bit integer from the byte stream or byte array.
        /// </summary>
        /// <returns></returns>
        ulong ReadUnsignedLong();

        /// <summary>
        /// Reads an IEEE 754 single-precision floating point number from the byte stream or byte array.
        /// </summary>
        /// <returns></returns>
        float ReadFloat();

        /// <summary>
        /// Reads an IEEE 754 double-precision floating point number from the byte stream or byte array.
        /// </summary>
        /// <returns></returns>
        double ReadDouble();

        /// <summary>
        /// Reads some bytes from an input stream or byte array and stores them into the buffer array bytes. The number of bytes read is equal to the length of bytes.
        /// </summary>
        /// <param name="bytes"></param>
        void ReadBytes(byte[] bytes);

        /// <summary>
        /// Reads length bytes of data from the byte stream or byte array.
        /// </summary>
        /// <param name="bytes"></param>
        /// <param name="offset"></param>
        /// <param name="length"></param>
        void ReadBytes(byte[] bytes, uint offset, uint length);

        /// <summary>
        /// Reads an object from the byte stream or byte array, encoded in AMF3 serialized format.
        /// </summary>
        /// <returns></returns>
        object ReadObject();

        /// <summary>
        /// Reads a UTF-8 string from the byte stream or byte array.
        /// </summary>
        /// <returns></returns>
        string ReadUTF();

        /// <summary>
        /// Reads a sequence of length UTF-8 bytes from the byte stream or byte array, and returns a string.
        /// </summary>
        /// <param name="length"></param>
        /// <returns></returns>
        string ReadUTFBytes(uint length);
    }
}




Go back to the Learning center:


Copyright © AgileLoad. All rights reserved.
Agile Load testing tool| Contact AgileLoad | Terms of Use | Sitemap