Example usage for org.apache.commons.collections BufferOverflowException getMessage

List of usage examples for org.apache.commons.collections BufferOverflowException getMessage

Introduction

In this page you can find the example usage for org.apache.commons.collections BufferOverflowException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Returns the detail message string of this throwable.

Usage

From source file:com.stainlesscode.mediapipeline.demux.SimpleDemultiplexer.java

@Override
public void handlePacket(IPacket packet) throws DemultiplexerException {
    if (LogUtil.isDebugEnabled())
        LogUtil.debug("extracting packet to buffer " + packet.getStreamIndex());

    Buffer destinationBuffer = engineRuntime.getStreamToBufferMap().get(packet.getStreamIndex());

    if (destinationBuffer == null) {
        LogUtil.debug("No destination configured for packet stream " + packet.getStreamIndex());
        returnBorrowed(packet);/*from  w ww  . j av  a 2  s  .c  om*/
    } else {
        try {
            destinationBuffer.add(packet.copyReference());
            // packet = null;
        } catch (BufferOverflowException e) {
            System.err.println(e.getMessage());
            return;
        }
    }
}