public class

BinaryWrapperUnit

extends WrapperUnit<T extends IUnit>
implements IBinaryUnit
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.impl.WrapperUnit<T extends com.pnfsoftware.jeb.core.units.IUnit>
     ↳ com.pnfsoftware.jeb.core.units.impl.BinaryWrapperUnit

Class Overview

Simple wrapper/decorator for IBinaryUnit

Summary

Public Constructors
BinaryWrapperUnit(IBinaryUnit unit, IUnitProvider provider)
Public Methods
int getConsummedSize()
Get the number of bytes consumed by the unit after processing.
IInput getInput()
Get the input data for that unit.
String getMimeType()
Retrieve the optional content-type for that unit.
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.core.units.impl.WrapperUnit
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.IUnitCreator
From interface com.pnfsoftware.jeb.core.units.IBinaryUnit
From interface com.pnfsoftware.jeb.core.units.IUnit
From interface com.pnfsoftware.jeb.corei.IWrap
From interface com.pnfsoftware.jeb.util.events.IEventSource

Public Constructors

public BinaryWrapperUnit (IBinaryUnit unit, IUnitProvider provider)

Parameters
unit IUnit to be delegated
provider provider that extends the unit behavior

Public Methods

public int getConsummedSize ()

Get the number of bytes consumed by the unit after processing. The implementation is optional, binary units are allowed to return 0.

Returns
  • a number of bytes comprised between 0 and the amount of bytes initially provided to that unit

public IInput getInput ()

Get the input data for that unit.

Returns
  • a mandatory input object

public String getMimeType ()

Retrieve the optional content-type for that unit.

Returns
  • optional content-type