This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 34692 - Allow getting an InputStream for the current content of the editor
Summary: Allow getting an InputStream for the current content of the editor
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Konecny
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2003-06-30 13:06 UTC by Petr Jiricka
Modified: 2008-12-22 21:41 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2003-06-30 13:06:07 UTC
It would be useful to have a generic way of
obtaining an InputStream containing the current
(possibly modified) content  of the editor window. 

Currently this can be done if the client of such a
feature also "owns" the (subclass of) the
CloneableEditor support. 

Currently, it is possible to get the content as
String in a generic way, however, this is not what
we want, since
- the String can not be converted to InputStream,
as we don't know the encoding
- the String will not contain characteds such as
guarded section markers

Related to issue 19928.
Comment 1 Petr Jiricka 2003-06-30 13:39:47 UTC
Fixed in the trunk.

Checking in CloneableEditorSupport.java;
/cvs/openide/src/org/openide/text/CloneableEditorSupport.java,v  <-- 
CloneableEditorSupport.java
new revision: 1.90; previous revision: 1.89
done

Diff:
http://openide.netbeans.org/source/browse/openide/src/org/openide/text/CloneableEditorSupport.java.diff?r1=1.88&r2=1.90