Package-level declarations

Types

Link copied to clipboard
object KRisIO

Convenience methods offering to directly work with IO methods.

Functions

Link copied to clipboard
fun File.accept(records: List<RisRecord>, sort: List<String> = emptyList())

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

fun OutputStream.accept(records: List<RisRecord>, sort: List<String> = emptyList())

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

fun Writer.accept(records: List<RisRecord>, sort: List<String> = emptyList())

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

fun String.accept(records: List<RisRecord>, sort: List<String> = emptyList())

Converts a list of RisRecords into a list of Strings in RIS file format, writing them into file with the path provided as the receiver, 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 File.process(): List<RisRecord>

Converts the RISFile lines in the File provided as receiver 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 InputStream.process(): List<RisRecord>

Converts the RISFile lines provided by the InputStream as receiver 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 Reader.process(): List<RisRecord>

Converts the RISFile lines provided by the reader as receiver 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 String.process(): List<RisRecord>

Converts the RISFile lines from the file with the path provided as receiver 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.