gradle-josm-plugin / org.openstreetmap.josm.gradle.plugin.i18n.io / MoReader

MoReader

@ExperimentalUnsignedTypes class MoReader

Reads the strings contained inside a *.mo file.

See the documentation of the MO file format.

Types

HeaderValues

class HeaderValues

Groups the header values to one object.

Constructors

<init>

MoReader(moFileURL: URL)

Functions

readFile

fun readFile(): Map<MsgId, MsgStr>

Reads the *.mo file at the given URL and returns the contained strings as a Map from MsgIds to MsgStrs.

Companion Object Properties

BE_MAGIC

val BE_MAGIC: ByteArray

The big-endian magic bytes of *.mo files (little-endian would be reversed)

HEADER_SIZE_IN_BYTES

const val HEADER_SIZE_IN_BYTES: UInt

28 bytes = 7 × 4 bytes (≙ 7 32bit numbers)