# Output (Red5 Server Documentation)
Date: 2010-02-21

## org.red5.io.mock
Class Output

    java.lang.Object
      org.red5.io.object.BaseOutput
          org.red5.io.mock.Output

All Implemented Interfaces:
  Output

    public class Output

extends BaseOutput
implements Output

Field Summary
`protected List<Object>` `list`
`protected static Logger` `log`

Fields inherited from class org.red5.io.object.BaseOutput
`refId, refMap`

Constructor Summary
`Output(List<Object> list)`

Method Summary
`boolean` `isCustom(Object custom)` Whether object is custom
`void` `putString(String string)`
`boolean` `supportsDataType(byte type)`
`void` `writeArray(Collection<?> array, Serializer serializer)` Write array.
`void` `writeArray(Object[] array, Serializer serializer)` Write array.
`void` `writeArray(Object array, Serializer serializer)` Write primitive array.
`void` `writeBoolean(Boolean bol)` Write boolean
`void` `writeByteArray(ByteArray array)` Write ByteArray object (AMF3 only).
`void` `writeCustom(Object custom)` Write custom (user) object
`void` `writeDate(Date date)` Write date
`void` `writeMap(Collection<?> array, Serializer serializer)` Write array as map.
`void` `writeMap(Map<Object,Object> map, Serializer serializer)` Write map.
`void` `writeNull()`
`void` `writeNumber(Number num)` Write number
`void` `writeObject(Map<Object,Object> map, Serializer serializer)` Write map as object.
`void` `writeObject(Object object, Serializer serializer)` Write object.
`void` `writeRecordSet(RecordSet recordset, Serializer serializer)` Write recordset.
`void` `writeReference(Object obj)` Write reference to complex data type
`void` `writeString(String string)` Write string
`void` `writeXML(Document xml)` Write XML object

Methods inherited from class org.red5.io.object.BaseOutput
`clearReferences, getReferenceId, hasReference, storeReference`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.red5.io.object.Output
`clearReferences`

Field Detail

### log

    protected static Logger log

### list

    protected List<Object> list

Constructor Detail

### Output

    public Output(List<Object> list)

Method Detail

### isCustom

    public boolean isCustom(Object custom)

  Whether object is custom

  Specified by:
    `isCustom` in interface `Output`
  Parameters:
    `custom` - Object
  Returns:
    true if object is of user type, false otherwise

### putString

    public void putString(String string)

  Specified by:
    `putString` in interface `Output`

### supportsDataType

    public boolean supportsDataType(byte type)

  Specified by:
    `supportsDataType` in interface `Output`

### writeBoolean

    public void writeBoolean(Boolean bol)

  Write boolean

  Specified by:
    `writeBoolean` in interface `Output`
  Parameters:
    `bol` - Boolean

### writeCustom

    public void writeCustom(Object custom)

  Write custom (user) object

  Specified by:
    `writeCustom` in interface `Output`
  Parameters:
    `custom` - Custom data type object

### writeDate

    public void writeDate(Date date)

  Write date

  Specified by:
    `writeDate` in interface `Output`
  Parameters:
    `date` - Date

### writeNull

    public void writeNull()

  Specified by:
    `writeNull` in interface `Output`

### writeNumber

    public void writeNumber(Number num)

  Write number

  Specified by:
    `writeNumber` in interface `Output`
  Parameters:
    `num` - Number

### writeReference

    public void writeReference(Object obj)

  Write reference to complex data type

  Specified by:
    `writeReference` in interface `Output`
  Parameters:
    `obj` - Referenced object

### writeString

    public void writeString(String string)

  Write string

  Specified by:
    `writeString` in interface `Output`
  Parameters:
    `string` - String

### writeXML

    public void writeXML(Document xml)

  Write XML object

  Specified by:
    `writeXML` in interface `Output`
  Parameters:
    `xml` - XML document

### writeArray

    public void writeArray(Collection<?> array,
                           Serializer serializer)

  Write array.

  Specified by:
    `writeArray` in interface `Output`
  Parameters:
    `array` - Array to write.
    `serializer` - Serializer to use for subobjects.

### writeArray

    public void writeArray(Object[] array,
                           Serializer serializer)

  Write array.

  Specified by:
    `writeArray` in interface `Output`
  Parameters:
    `array` - Array to write.
    `serializer` - Serializer to use for subobjects.

### writeArray

    public void writeArray(Object array,
                           Serializer serializer)

  Write primitive array.

  Specified by:
    `writeArray` in interface `Output`
  Parameters:
    `array` - Array to write.
    `serializer` - Serializer to use for subobjects.

### writeMap

    public void writeMap(Map<Object,Object> map,
                         Serializer serializer)

  Write map.

  Specified by:
    `writeMap` in interface `Output`
  Parameters:
    `map` - Map to write
    `serializer` - Serializer to use for subobjects.

### writeMap

    public void writeMap(Collection<?> array,
                         Serializer serializer)

  Write array as map.

  Specified by:
    `writeMap` in interface `Output`
  Parameters:
    `array` - Array to write
    `serializer` - Serializer to use for subobjects.

### writeObject

    public void writeObject(Object object,
                            Serializer serializer)

  Write object.

  Specified by:
    `writeObject` in interface `Output`
  Parameters:
    `object` - Object to write
    `serializer` - Serializer to use for subobjects.

### writeObject

    public void writeObject(Map<Object,Object> map,
                            Serializer serializer)

  Write map as object.

  Specified by:
    `writeObject` in interface `Output`
  Parameters:
    `map` - Map to write
    `serializer` - Serializer to use for subobjects.

### writeRecordSet

    public void writeRecordSet(RecordSet recordset,
                               Serializer serializer)

  Write recordset.

  Specified by:
    `writeRecordSet` in interface `Output`
  Parameters:
    `recordset` - Recordset to write.
    `serializer` - Serializer to use for subobjects.

### writeByteArray

    public void writeByteArray(ByteArray array)

  Write ByteArray object (AMF3 only).

  Specified by:
    `writeByteArray` in interface `Output`
  Parameters:
    `array` - object to write

Copyright © 2006-2010 The Red5 Project