org.red5.server.net.rtmp.event

## Class ChunkSize

- java.lang.Object
- - org.red5.server.net.rtmp.event.BaseEvent
  - - org.red5.server.net.rtmp.event.ChunkSize

All Implemented Interfaces:
  Externalizable, Serializable, IEvent, IRTMPEvent, Constants

    public class ChunkSize
    extends BaseEvent

Chunk size event

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.red5.server.api.event.IEvent

`IEvent.Type`

### Field Summary

### Fields inherited from class org.red5.server.net.rtmp.event.BaseEvent

`header, object, refcount, source, timestamp`

### Fields inherited from interface org.red5.server.net.rtmp.message.Constants

`HANDSHAKE_SIZE, HEADER_CONTINUE, HEADER_NEW, HEADER_SAME_SOURCE, HEADER_TIMER_CHANGE, MEDIUM_INT_MAX, SO_CLIENT_CLEAR_DATA, SO_CLIENT_DELETE_DATA, SO_CLIENT_INITIAL_DATA, SO_CLIENT_SEND_MESSAGE, SO_CLIENT_STATUS, SO_CLIENT_UPDATE_ATTRIBUTE, SO_CLIENT_UPDATE_DATA, SO_CONNECT, SO_DELETE_ATTRIBUTE, SO_DISCONNECT, SO_SEND_MESSAGE, SO_SET_ATTRIBUTE, SOURCE_TYPE_LIVE, SOURCE_TYPE_VOD, TYPE_ABORT, TYPE_AGGREGATE, TYPE_AUDIO_DATA, TYPE_BYTES_READ, TYPE_CHUNK_SIZE, TYPE_CLIENT_BANDWIDTH, TYPE_EDGE_ORIGIN, TYPE_FLEX_MESSAGE, TYPE_FLEX_SHARED_OBJECT, TYPE_FLEX_STREAM_SEND, TYPE_INVOKE, TYPE_NOTIFY, TYPE_PING, TYPE_SERVER_BANDWIDTH, TYPE_SHARED_OBJECT, TYPE_STREAM_METADATA, TYPE_VIDEO_DATA`

### Constructor Summary

Constructors
Constructor and Description
`ChunkSize()`
`ChunkSize(int size)` Create chunk size event with given size

### Method Summary

Methods
`protected void` `doRelease()` Releases chunk (set size to zero)
`boolean` `equals(Object obj)`
`byte` `getDataType()` Getter for data type
`int` `getSize()` Getter for size.
`int` `hashCode()`
`void` `readExternal(ObjectInput in)`
`protected void` `releaseInternal()` Release event
`void` `setSize(int size)` Setter for size.
`String` `toString()`
`void` `writeExternal(ObjectOutput out)`

### Methods inherited from class org.red5.server.net.rtmp.event.BaseEvent

`getHeader, getObject, getSource, getSourceType, getTimestamp, getType, hasSource, release, retain, setHeader, setSource, setSourceType, setTimestamp, setType`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ChunkSize

    public ChunkSize()

#### ChunkSize

    public ChunkSize(int size)

Create chunk size event with given size

Parameters:
  `size` - Chunk size

### Method Detail

#### getDataType

    public byte getDataType()

Getter for data type

Specified by:
  `getDataType` in interface `IRTMPEvent`
Specified by:
  `getDataType` in class `BaseEvent`
Returns:
  Data type

#### getSize

    public int getSize()

Getter for size.

Returns:
  Chunk size

#### setSize

    public void setSize(int size)

Setter for size.

Parameters:
  `size` - Chunk size

#### doRelease

    protected void doRelease()

Releases chunk (set size to zero)

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### releaseInternal

    protected void releaseInternal()

Release event

Specified by:
  `releaseInternal` in class `BaseEvent`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Specified by:
  `readExternal` in interface `Externalizable`
Overrides:
  `readExternal` in class `BaseEvent`
Throws:
  `IOException`
  `ClassNotFoundException`

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Overrides:
  `writeExternal` in class `BaseEvent`
Throws:
  `IOException`