/*
 * @author Ranides Atterwim {@literal <ranides@gmail.com>}
 * @copyright Ranides Atterwim
 * @license WTFPL
 * @url http://ranides.net/projects/assira
 */
package net.ranides.assira.text;

import lombok.experimental.UtilityClass;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

/**
 * Class with charset constansts.
 *
 * {@link StandardCharsets} class does not have some constants defined here.
 */
@UtilityClass
public final class Charsets {

    /**
     * ISO646-US 7-bit charset
     */
    public static final Charset US_ASCII = StandardCharsets.US_ASCII;

    /**
     * ISO-LATIN-1
     */
    public static final Charset ISO88591 = StandardCharsets.ISO_8859_1;

    /**
     * UTF-8
     */
    public static final Charset UTF8 = StandardCharsets.UTF_8;

    /**
     * UTF-16 big-endian
     */
    public static final Charset UTF16BE = StandardCharsets.UTF_16BE;

    /**
     * UTF-16 little-endian
     */
    public static final Charset UTF16LE = StandardCharsets.UTF_16LE;

    /**
     * UTF-16 with byte order mark
     */
    public static final Charset UTF16 = StandardCharsets.UTF_16;

    /**
     * UTF-32 with byte order mark
     */
    public static final Charset UTF32 = Charset.forName("UTF-32");

    /**
     * IBM852: polish MS-DOS charset
     */
    public static final Charset PL_DOS = Charset.forName("IBM852");

    /**
     * ISO-8859-2: polish "internet" charset
     */
    public static final Charset PL_ISO = Charset.forName("ISO-8859-2");

    /**
     * windows-1250: polish windows charset
     */
    public static final Charset PL_WINDOWS = Charset.forName("windows-1250");

    /**
     * Mazovia: ancient unofficial polish charset
     */
    public static final Charset MAZOVIA = MazoviaCharset.CHARSET;

}
