JAVA 常量整理

1 UTF-8

import org.apache.commons.lang.CharEncoding;

CharEncoding.UTF_8//返回STRING



import com.google.common.base.Charsets;

Charsets.UTF_8//返回Charset


2 系统换行符

import org.apache.commons.io.IOUtils;
IOUtils.LINE_SEPARATOR


3 文件分隔符

import org.apache.commons.io.FileUtils;

File.pathSeparator
IOUtils.DIR_SEPARATOR

以上两个是相等的

你可能感兴趣的:(java)