dom4j格式化输出为String作例子
/**
* 打印文档,String输出
*
* @param doc
* @param encoding
*/
public static String printString(Document doc, String encoding) {
if (encoding == null)// 默认为UTF-8编码
{
encoding = "UTF-8";
}
String docStr = null;
OutputFormat format = OutputFormat.c ...
原文地址:ostermiller.org/convert_java_outputstream_inputstream.html
Convert a Java OutputStream to an InputStream
If you have ever programmed using Java IO, you will quickly run into a situation in which a class creates data on an OutputStream and you need to send it to another class that expects to r ...
原文地址:ostermiller.org/convert_java_writer_reader.html
Convert a Java Writer to a Reader
If you have ever programmed using Java IO, you will quickly run into a situation in which a class creates data on a Writer and you need to send it to another class that expects to read the data from a Reader. Yo ...
- 浏览: 6800 次
- 性别:

- 来自: 广东广州

- 详细资料






评论排行榜