⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 documentstorage.java

📁 jmx在spring中的实现
💻 JAVA
字号:
/*
======================================================================

  MBeanDescriptorDocument.java

  Created by Claude Duguay
  Copyright (c) 2005

======================================================================
*/

package com.claudeduguay.util.jdom;

import java.io.*;

import org.jdom.*;
import org.jdom.input.*;
import org.jdom.output.*;

public class DocumentStorage
{
	public Document read(File file) throws IOException, JDOMException
	{
		return read(new FileInputStream(file));
	}
	
	public Document read(InputStream input) throws IOException, JDOMException
	{
		SAXBuilder builder = new SAXBuilder();
		return builder.build(input);
	}
	
	public void write(Document doc, File file) throws IOException, JDOMException
	{
		write(doc, new FileOutputStream(file));
	}

	public void write(Document doc, OutputStream output) throws IOException, JDOMException
	{
		XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
		outputter.output(doc, output);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -