public class AisPacketCSVOutputSink extends dk.dma.commons.util.io.OutputStreamSink<AisPacket>
| Modifier and Type | Field and Description |
|---|---|
protected static String |
NULL_INDICATOR
The constant NULL_INDICATOR.
|
| Constructor and Description |
|---|
AisPacketCSVOutputSink()
Instantiates a new Ais packet csv output sink.
|
AisPacketCSVOutputSink(String format)
Instantiates a new Ais packet csv output sink.
|
AisPacketCSVOutputSink(String format,
String separator)
Instantiates a new Ais packet csv output sink.
|
| Modifier and Type | Method and Description |
|---|---|
void |
footer(OutputStream stream,
long count) |
protected String |
formatEta(Date eta)
Format eta string.
|
protected String |
formatEta(int day,
int month,
int hour,
int minute)
Format eta string.
|
protected String |
formatEta(long eta)
Format eta string.
|
void |
process(OutputStream stream,
AisPacket packet,
long count) |
protected void |
setNullValueForCallsign(Function<AisMessage,Object> nullValueForCallsign)
Sets null value for callsign.
|
protected void |
setNullValueForCog(Function<AisMessage,Object> nullValueForCog)
Sets null value for cog.
|
protected void |
setNullValueForDestination(Function<AisMessage,Object> nullValueForDestination)
Sets null value for destination.
|
protected void |
setNullValueForDimBow(Function<AisMessage,Object> nullValueForDimBow)
Sets null value for dim bow.
|
protected void |
setNullValueForDimPort(Function<AisMessage,Object> nullValueForDimPort)
Sets null value for dim port.
|
protected void |
setNullValueForDimStarboard(Function<AisMessage,Object> nullValueForDimStarboard)
Sets null value for dim starboard.
|
protected void |
setNullValueForDimStern(Function<AisMessage,Object> nullValueForDimStern)
Sets null value for dim stern.
|
protected void |
setNullValueForDraught(Function<AisMessage,Object> nullValueForDraught)
Sets null value for draught.
|
protected void |
setNullValueForEta(Function<AisMessage,Object> nullValueForEta)
Sets null value for eta.
|
protected void |
setNullValueForImo(Function<AisMessage,Object> nullValueForImo)
Sets null value for imo.
|
protected void |
setNullValueForLatitude(Function<AisMessage,Object> nullValueForLatitude)
Sets null value for latitude.
|
protected void |
setNullValueForLongitude(Function<AisMessage,Object> nullValueForLongitude)
Sets null value for longitude.
|
protected void |
setNullValueForName(Function<AisMessage,Object> nullValueForName)
Sets null value for name.
|
protected void |
setNullValueForPositionAccuracy(Function<AisMessage,Object> nullValueForPositionAccuracy)
Sets null value for position accuracy.
|
protected void |
setNullValueForShipCargo(Function<AisMessage,Object> nullValueForShipCargo)
Sets null value for ship cargo.
|
protected void |
setNullValueForShipType(Function<AisMessage,Object> nullValueForShipType)
Sets null value for ship type.
|
protected void |
setNullValueForShipTypeCargoTypeCode(Function<AisMessage,Object> nullValueForShipTypeCargoTypeCode)
Sets null value for ship type cargo type code.
|
protected void |
setNullValueForSog(Function<AisMessage,Object> nullValueForSog)
Sets null value for sog.
|
protected void |
setNullValueForTrueHeading(Function<AisMessage,Object> nullValueForTrueHeading)
Sets null value for true heading.
|
protected static final String NULL_INDICATOR
public AisPacketCSVOutputSink()
public AisPacketCSVOutputSink(String format)
format - the formatpublic void process(OutputStream stream, AisPacket packet, long count) throws IOException
process in class dk.dma.commons.util.io.OutputStreamSink<AisPacket>IOExceptionpublic void footer(OutputStream stream, long count) throws IOException
footer in class dk.dma.commons.util.io.OutputStreamSink<AisPacket>IOExceptionprotected String formatEta(long eta)
eta - the etaprotected String formatEta(Date eta)
eta - the etaprotected String formatEta(int day, int month, int hour, int minute)
day - the daymonth - the monthhour - the hourminute - the minuteprotected void setNullValueForPositionAccuracy(Function<AisMessage,Object> nullValueForPositionAccuracy)
nullValueForPositionAccuracy - the null value for position accuracyprotected void setNullValueForLatitude(Function<AisMessage,Object> nullValueForLatitude)
nullValueForLatitude - the null value for latitudeprotected void setNullValueForLongitude(Function<AisMessage,Object> nullValueForLongitude)
nullValueForLongitude - the null value for longitudeprotected void setNullValueForSog(Function<AisMessage,Object> nullValueForSog)
nullValueForSog - the null value for sogprotected void setNullValueForCog(Function<AisMessage,Object> nullValueForCog)
nullValueForCog - the null value for cogprotected void setNullValueForTrueHeading(Function<AisMessage,Object> nullValueForTrueHeading)
nullValueForTrueHeading - the null value for true headingprotected void setNullValueForDraught(Function<AisMessage,Object> nullValueForDraught)
nullValueForDraught - the null value for draughtprotected void setNullValueForName(Function<AisMessage,Object> nullValueForName)
nullValueForName - the null value for nameprotected void setNullValueForDimBow(Function<AisMessage,Object> nullValueForDimBow)
nullValueForDimBow - the null value for dim bowprotected void setNullValueForDimPort(Function<AisMessage,Object> nullValueForDimPort)
nullValueForDimPort - the null value for dim portprotected void setNullValueForDimStarboard(Function<AisMessage,Object> nullValueForDimStarboard)
nullValueForDimStarboard - the null value for dim starboardprotected void setNullValueForDimStern(Function<AisMessage,Object> nullValueForDimStern)
nullValueForDimStern - the null value for dim sternprotected void setNullValueForShipTypeCargoTypeCode(Function<AisMessage,Object> nullValueForShipTypeCargoTypeCode)
nullValueForShipTypeCargoTypeCode - the null value for ship type cargo type codeprotected void setNullValueForShipType(Function<AisMessage,Object> nullValueForShipType)
nullValueForShipType - the null value for ship typeprotected void setNullValueForShipCargo(Function<AisMessage,Object> nullValueForShipCargo)
nullValueForShipCargo - the null value for ship cargoprotected void setNullValueForCallsign(Function<AisMessage,Object> nullValueForCallsign)
nullValueForCallsign - the null value for callsignprotected void setNullValueForImo(Function<AisMessage,Object> nullValueForImo)
nullValueForImo - the null value for imoprotected void setNullValueForDestination(Function<AisMessage,Object> nullValueForDestination)
nullValueForDestination - the null value for destinationprotected void setNullValueForEta(Function<AisMessage,Object> nullValueForEta)
nullValueForEta - the null value for etaCopyright © 2011–2019 Danish Maritime Authority. All rights reserved.