
com.gc.iotools.fmt.decoders.TSDDecoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wazformat Show documentation
Show all versions of wazformat Show documentation
Format identification utilities
The newest version!
package com.gc.iotools.fmt.decoders;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import com.gc.iotools.fmt.base.Decoder;
import com.gc.iotools.fmt.base.FormatEnum;
/**
* Decoder for TSD (TimeStampedData) documents.
*
* @author Giacomo Boccardo ([email protected])
*
* @see Decoder
*/
public class TSDDecoder implements Decoder {
@Override
public InputStream decode(final InputStream tsdIS) throws IOException {
TimeStampedDataParser tsdParser;
try {
tsdParser = new TimeStampedDataParser(tsdIS);
} catch (final IOException e) {
throw new IOException("Error parsing TSD content", e);
}
return new BufferedInputStream(tsdParser.getContentAsIS());
}
@Override
public FormatEnum getFormat() {
return FormatEnum.TSD;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy