From 142af38234778f8cab208c1ad4a9574d12ed27e9 Mon Sep 17 00:00:00 2001 From: richie Date: Wed, 21 Aug 2019 21:25:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E7=82=B9=E7=82=B9=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=92=8C=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/consts/EncodeConstantsKit.java | 22 ++++++++++ .../java/com/fanruan/api/util/ArrayKit.java | 42 +++++++++++++++++-- .../java/com/fanruan/constants/Constants.java | 6 --- 3 files changed, 61 insertions(+), 9 deletions(-) create mode 100644 src/main/java/com/fanruan/api/consts/EncodeConstantsKit.java delete mode 100644 src/main/java/com/fanruan/constants/Constants.java diff --git a/src/main/java/com/fanruan/api/consts/EncodeConstantsKit.java b/src/main/java/com/fanruan/api/consts/EncodeConstantsKit.java new file mode 100644 index 0000000..ca90bab --- /dev/null +++ b/src/main/java/com/fanruan/api/consts/EncodeConstantsKit.java @@ -0,0 +1,22 @@ +package com.fanruan.api.consts; +import com.fr.stable.EncodeConstants; + +public class EncodeConstantsKit { + + public static final String ENCODING_UTF_8 = EncodeConstants.ENCODING_UTF_8; + + public static final String ENCODING_GBK = EncodeConstants.ENCODING_GBK; + + public static final String ENCODING_BIG5 = EncodeConstants.ENCODING_BIG5; + + public static final String ENCODING_ISO_8859_1 = EncodeConstants.ENCODING_ISO_8859_1; + + + public static final String ENCODING_UTF_16 = EncodeConstants.ENCODING_UTF_16; + + public static final String ENCODING_EUC_JP = EncodeConstants.ENCODING_EUC_JP; + + public static final String ENCODING_EUC_KR = EncodeConstants.ENCODING_EUC_KR; + + public static final String ENCODING_CP850 = EncodeConstants.ENCODING_CP850; +} diff --git a/src/main/java/com/fanruan/api/util/ArrayKit.java b/src/main/java/com/fanruan/api/util/ArrayKit.java index 792aa3a..2a3d1b2 100644 --- a/src/main/java/com/fanruan/api/util/ArrayKit.java +++ b/src/main/java/com/fanruan/api/util/ArrayKit.java @@ -1,7 +1,5 @@ package com.fanruan.api.util; -import java.io.IOException; -import java.lang.reflect.Array; import com.fr.stable.ArrayUtils; /** @@ -10,7 +8,45 @@ import com.fr.stable.ArrayUtils; * Created by richie on 2019-08-16 */ public class ArrayKit { - public static final String[] EMPTY_STRING_ARRAY = new String[0]; + + public static final Object[] EMPTY_OBJECT_ARRAY = ArrayUtils.EMPTY_OBJECT_ARRAY; + + public static final Class[] EMPTY_CLASS_ARRAY = ArrayUtils.EMPTY_CLASS_ARRAY; + + public static final String[] EMPTY_STRING_ARRAY = ArrayUtils.EMPTY_STRING_ARRAY; + + public static final long[] EMPTY_LONG_ARRAY = ArrayUtils.EMPTY_LONG_ARRAY; + + public static final Long[] EMPTY_LONG_OBJECT_ARRAY = ArrayUtils.EMPTY_LONG_OBJECT_ARRAY; + + public static final int[] EMPTY_INT_ARRAY = ArrayUtils.EMPTY_INT_ARRAY; + + public static final Integer[] EMPTY_INTEGER_OBJECT_ARRAY = ArrayUtils.EMPTY_INTEGER_OBJECT_ARRAY; + + public static final short[] EMPTY_SHORT_ARRAY = ArrayUtils.EMPTY_SHORT_ARRAY; + + public static final Short[] EMPTY_SHORT_OBJECT_ARRAY = ArrayUtils.EMPTY_SHORT_OBJECT_ARRAY; + + public static final byte[] EMPTY_BYTE_ARRAY = ArrayUtils.EMPTY_BYTE_ARRAY; + + public static final Byte[] EMPTY_BYTE_OBJECT_ARRAY = ArrayUtils.EMPTY_BYTE_OBJECT_ARRAY; + + public static final double[] EMPTY_DOUBLE_ARRAY = ArrayUtils.EMPTY_DOUBLE_ARRAY; + + public static final Double[] EMPTY_DOUBLE_OBJECT_ARRAY = ArrayUtils.EMPTY_DOUBLE_OBJECT_ARRAY; + + public static final float[] EMPTY_FLOAT_ARRAY = ArrayUtils.EMPTY_FLOAT_ARRAY; + + public static final Float[] EMPTY_FLOAT_OBJECT_ARRAY = ArrayUtils.EMPTY_FLOAT_OBJECT_ARRAY; + + public static final boolean[] EMPTY_BOOLEAN_ARRAY = ArrayUtils.EMPTY_BOOLEAN_ARRAY; + + public static final Boolean[] EMPTY_BOOLEAN_OBJECT_ARRAY = ArrayUtils.EMPTY_BOOLEAN_OBJECT_ARRAY; + + public static final char[] EMPTY_CHAR_ARRAY = ArrayUtils.EMPTY_CHAR_ARRAY; + + public static final Character[] EMPTY_CHARACTER_OBJECT_ARRAY = ArrayUtils.EMPTY_CHARACTER_OBJECT_ARRAY; + /** * 判断数组是否为空 * diff --git a/src/main/java/com/fanruan/constants/Constants.java b/src/main/java/com/fanruan/constants/Constants.java deleted file mode 100644 index ea4b5e0..0000000 --- a/src/main/java/com/fanruan/constants/Constants.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.fanruan.constants; -import com.fr.stable.EncodeConstants; - -public class Constants { - public static final String ENCODING_UTF_8 = EncodeConstants.ENCODING_UTF_8; -}