}
private ParserResult read(InputStream source, int readBufferSize, CompactCalendar startDate,
List<NavigationFormat> formats) throws IOException {
log.fine("Reading '" + source + "' with a buffer of " + readBufferSize + " bytes by " + formats.size() + " formats");
NotClosingUnderlyingInputStream buffer = new NotClosingUnderlyingInputStream(new BufferedInputStream(source));
buffer.mark(readBufferSize + 1);
try {
ParserContext<BaseRoute> context = new InternalParserContext<BaseRoute>();
internalRead(buffer, startDate, formats, context);
return createResult(context);
} finally {
buffer.closeUnderlyingInputStream();
}
}