Package org.jpos.util.function
Class RemoveNewLinesMapper
- java.lang.Object
-
- org.jpos.util.function.RemoveNewLinesMapper
-
- All Implemented Interfaces:
java.util.function.Function<byte[],byte[]>
,Configurable
,ByteArrayMapper
public class RemoveNewLinesMapper extends java.lang.Object implements ByteArrayMapper, Configurable
Mapper for removing newlines from the output of writing LogEvents to a stream. Configuration options allow you to optionally combine multiple spaces into a single space and opting not to add a newline at the end of the data. Example:
Since: - 2.1.4
-
-
Constructor Summary
Constructors Constructor Description RemoveNewLinesMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
apply(byte[] bytes)
void
setConfiguration(Configuration cfg)
-
-
-
Constructor Detail
-
RemoveNewLinesMapper
public RemoveNewLinesMapper()
-
-
Method Detail
-
apply
public byte[] apply(byte[] bytes)
- Specified by:
apply
in interfacejava.util.function.Function<byte[],byte[]>
-
setConfiguration
public void setConfiguration(Configuration cfg) throws ConfigurationException
- Specified by:
setConfiguration
in interfaceConfigurable
- Parameters:
cfg
- Configuration object- Throws:
ConfigurationException
-
-