KRisIO

object KRisIO

Convenience methods offering to directly work with IO methods.

Functions

Link copied to clipboard
fun export(records: List<RisRecord>, sort: List<String> = emptyList(), file: File, dispatchers: DispatcherProvider = DefaultDispatcherProvider)

Converts a list of RisRecords into a list of Strings in RIS file format, writing them into the provided File. Optionally accepts a list of names of RisTags defining a sort order for the RisTags in the file.

fun export(records: List<RisRecord>, sort: List<String> = emptyList(), out: OutputStream, dispatchers: DispatcherProvider = DefaultDispatcherProvider)

Converts a list of RisRecords into a list of Strings in RIS file format, writing them into the provided OutputStream. Optionally accepts a list of names of RisTags defining a sort order for the RisTags in the file.

fun export(records: List<RisRecord>, sort: List<String> = emptyList(), writer: Writer, dispatchers: DispatcherProvider = DefaultDispatcherProvider)

Converts a list of RisRecords into a list of Strings in RIS file format, dumping them into the provided Writer. Optionally accepts a list of names of RisTags defining a sort order for the RisTags in the file.

fun export(records: List<RisRecord>, sort: List<String> = emptyList(), filePath: String, dispatchers: DispatcherProvider = DefaultDispatcherProvider)

Converts a list of RisRecords into a list of Strings in RIS file format, writing them into file with the specified path if possible. Optionally accepts a list of names of RisTags defining a sort order for the RisTags in the file.

Link copied to clipboard
fun process(file: File, dispatchers: DispatcherProvider = DefaultDispatcherProvider): List<RisRecord>

Converts the RISFile lines in the provided File into a list of RisRecords. May throw an IOException if the file cannot be read successfully. or a KRisException if the lines cannot be parsed successfully.

fun process(inputStream: InputStream, dispatchers: DispatcherProvider = DefaultDispatcherProvider): List<RisRecord>

Converts the RISFile lines provided by the InputStream into a list of RisRecords. May throw an IOException if the stream cannot be read successfully. or a KRisException if the lines cannot be parsed successfully.

fun process(reader: Reader, dispatchers: DispatcherProvider = DefaultDispatcherProvider): List<RisRecord>

Converts the RISFile lines provided by the reader into a list of RisRecords. May throw an IOException if the reader fails to deliver lines or a KRisException if the lines cannot be parsed successfully.

fun process(filePath: String, dispatchers: DispatcherProvider = DefaultDispatcherProvider): List<RisRecord>

Converts the RISFile lines from the file with the provided path into a list of RisRecords. May throw an IOException if the file cannot be read successfully. or a KRisException if the lines cannot be parsed successfully.

Link copied to clipboard
fun processToStream(file: File, dispatchers: DispatcherProvider = DefaultDispatcherProvider): Stream<RisRecord>

Converts the RISFile lines in the provided File into a stream of RisRecords. May throw an IOException if the file cannot be read successfully. or a KRisException if the lines cannot be parsed successfully.

fun processToStream(inputStream: InputStream, dispatchers: DispatcherProvider = DefaultDispatcherProvider): Stream<RisRecord>

Converts the RISFile lines provided by the InputStream into a stream of RisRecords. May throw an IOException if the stream cannot be read successfully. or a KRisException if the lines cannot be parsed successfully.

fun processToStream(reader: Reader, dispatchers: DispatcherProvider = DefaultDispatcherProvider): Stream<RisRecord>

Converts the RISFile lines provided by the reader into a stream of RisRecords. May throw an IOException if the reader fails to deliver lines or a KRisException if the lines cannot be parsed successfully.

fun processToStream(filePath: String, dispatchers: DispatcherProvider = DefaultDispatcherProvider): Stream<RisRecord>

Converts the RISFile lines from the file with the provided path into a stream of RisRecords. May throw an IOException if the file cannot be read successfully. or a KRisException if the lines cannot be parsed successfully.