001/*
002 * Copyright (c) 2009 The openGion Project.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
013 * either express or implied. See the License for the specific language
014 * governing permissions and limitations under the License.
015 */
016package org.opengion.fukurou.system;                                                            // 6.4.2.0 (2016/01/29) package変更 fukurou.util → fukurou.system
017
018import java.nio.charset.Charset;                // 5.5.2.6 (2012/05/25)
019
020/**
021 * 共通的に使用される固定値を集約したクラスです。
022 *
023 * 全変数は、public static final 宣言されています。
024 *
025 * @og.rev 6.1.0.0 (2014/12/26) 固定値を集約したクラス対応
026 * @og.rev 6.4.2.0 (2016/01/29) package変更 fukurou.util → fukurou.system
027 *
028 * @og.group その他
029 *
030 * @version  6.0
031 * @author       Kazuhiko Hasegawa
032 * @since    JDK8.0,
033 */
034public final class HybsConst {
035
036        /** バッファの初期容量を設定する固定値(通常より若干多い目)。  {@value}  */
037        public static final int BUFFER_SMALL  = 100;
038
039        /** バッファの初期容量を設定する固定値(通常より多い目)。  {@value}  */
040        public static final int BUFFER_MIDDLE = 200;
041
042        /** バッファの初期容量を設定する固定値(通常より大幅に多い目)。  {@value} */
043        public static final int BUFFER_LARGE  = 500;
044
045        /** システム依存の改行記号(String)。        */
046        public static final String CR = System.getProperty("line.separator");
047
048        /** HTMLでの改行記号( <br /> )。 */
049        public static final String BR = "<br />" + CR ;
050
051        /** システム依存のファイルセパレーター文字(char)。  */
052        public static final char FS = System.getProperty("file.separator").charAt(0);
053
054        /** タブ文字(char)。 */
055        public static final char TAB = '\t';
056
057        /**
058         * プラットフォーム依存のデフォルトの Charset です。
059         * プラットフォーム依存性を考慮する場合、エンコード指定で作成しておく事をお勧めします。
060         *
061         * @og.rev 5.5.2.6 (2012/05/25) findbugs対応
062         * @og.rev 6.4.2.0 (2016/01/29) fukurou.util.StringUtil → fukurou.system.HybsConst に変更
063         */
064        public static final Charset DEFAULT_CHARSET = Charset.defaultCharset() ;
065
066        /**
067         * ファイル等を読み取る場合のデフォルトエンコードを指定します。
068         * 通常は、UTF-8 にしておきます。
069         *
070         * @og.rev 6.4.5.1 (2016/04/28) ファイル等を読み取る場合のデフォルトエンコードを指定します。
071         */
072        public static final String UTF_8 = "UTF-8" ;
073
074        /**
075         * デフォルトコンストラクターをprivateにして、
076         * オブジェクトの生成をさせないようにする。
077         */
078        private HybsConst() {}
079}