PlainTextDocument

遗产: java.lang.Object

public class PlainTextDocument

允许提取文档内容的纯文本表示。

要了解更多信息,请访问Working with Text Document文档文章。

构造器

构造函数描述
PlainTextDocument(String fileName)从文件创建纯文本文档。
PlainTextDocument(String fileName, LoadOptions loadOptions)从文件创建纯文本文档。
PlainTextDocument(InputStream stream)初始化此类的新实例。
PlainTextDocument(InputStream stream, LoadOptions loadOptions)初始化此类的新实例。

方法

方法描述
equals(Object arg0)
getBuiltInDocumentProperties()得到getBuiltInDocumentProperties()的文件。
getClass()
getCustomDocumentProperties()得到getCustomDocumentProperties()的文件。
getText()获取连接为字符串的文档的文本内容。
hashCode()
notify()
notifyAll()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

PlainTextDocument(String fileName)

public PlainTextDocument(String fileName)

从文件创建纯文本文档。自动检测文件格式。

参数:

范围类型描述
fileNamejava.lang.String要从中提取文本的文件的名称。

PlainTextDocument(String fileName, LoadOptions loadOptions)

public PlainTextDocument(String fileName, LoadOptions loadOptions)

从文件创建纯文本文档。允许指定其他选项,例如加密密码。

参数:

范围类型描述
fileNamejava.lang.String要从中提取文本的文件的名称。
loadOptionsLoadOptions加载文档时使用的其他选项。可以为空。

PlainTextDocument(InputStream stream)

public PlainTextDocument(InputStream stream)

初始化此类的新实例。

参数:

范围类型描述
streamjava.io.InputStream

PlainTextDocument(InputStream stream, LoadOptions loadOptions)

public PlainTextDocument(InputStream stream, LoadOptions loadOptions)

初始化此类的新实例。

参数:

范围类型描述
streamjava.io.InputStream
loadOptionsLoadOptions

equals(Object arg0)

public boolean equals(Object arg0)

参数:

范围类型描述
arg0java.lang.Object

退货: 布尔值

getBuiltInDocumentProperties()

public BuiltInDocumentProperties getBuiltInDocumentProperties()

得到getBuiltInDocumentProperties()的文件。

退货: BuiltInDocumentProperties -{getBuiltInDocumentProperties()的文件。

getClass()

public final native Class<?> getClass()

退货: java.lang.Class

getCustomDocumentProperties()

public CustomDocumentProperties getCustomDocumentProperties()

得到getCustomDocumentProperties()的文件。

退货: CustomDocumentProperties -{getCustomDocumentProperties()的文件。

getText()

public String getText()

获取连接为字符串的文档的文本内容。

退货: java.lang.String - 连接为字符串的文档的文本内容。

hashCode()

public native int hashCode()

退货: 整数

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

toString()

public String toString()

退货: java.lang.字符串

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

参数:

范围类型描述
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

参数:

范围类型描述
arg0long
arg1int