public class ConvertingPipe<C,P,CONS extends CommandContext<? super P>> extends AbstractPipe<C,P,CONS>
| Modifier and Type | Field and Description |
|---|---|
private Class<C> |
consumedType
.
|
private Class<P> |
producedType
.
|
consumer, piped| Constructor and Description |
|---|
ConvertingPipe(Class<C> consumedType,
Class<P> producedType,
boolean piped) |
| Modifier and Type | Method and Description |
|---|---|
Class<C> |
getConsumedType()
Returns the class of the element generic type.
|
Class<P> |
getProducedType()
Returns the class of the produced type.
|
void |
provide(C element)
Provide an element.
|
void |
write(Chunk chunk)
Write a chunk to the screen.
|
close, flush, getAttributes, getHeight, getProperty, getSession, getWidth, isPiped, open, readLine, releaseAlternateBuffer, takeAlternateBufferprivate final Class<C> consumedType
private final Class<P> producedType
public ConvertingPipe(Class<C> consumedType, Class<P> producedType, boolean piped)
public Class<C> getConsumedType()
Consumerpublic Class<P> getProducedType()
Producerpublic void write(Chunk chunk) throws IOException
ScreenContextchunk - the chunkIOException - any io exceptionpublic void provide(C element) throws IOException
Consumerelement - the provided elementIOExceptionCopyright © 2014 eXo Platform SAS. All Rights Reserved.