Class NbBundle.DebugLoader.DebugInputStream

  extended by
      extended by org.openide.util.NbBundle.DebugLoader.DebugInputStream
All Implemented Interfaces:
Enclosing class:

static final class NbBundle.DebugLoader.DebugInputStream

Wrapper input stream which parses the text as it goes and adds annotations. Resource-bundle values are annotated with their current line number and also the supplied it, so e.g. if in the original input stream on line 50 we have: somekey=somevalue so in the wrapper stream (id 123) this line will read: somekey=somevalue (123:50) Since you see on stderr what #123 is, you can then pinpoint where any bundle key originally came from, assuming NbBundle loaded it from a *.properties file.

See Also:
Properties#load} for details on the syntax of *.properties files.

Constructor Summary
NbBundle.DebugLoader.DebugInputStream( base, int id, boolean localizable)
          Create a new InputStream which will annotate resource bundles.
Method Summary
 int read()
Methods inherited from class
available, close, mark, markSupported, read, read, reset, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public NbBundle.DebugLoader.DebugInputStream( base,
                                             int id,
                                             boolean localizable)
Create a new InputStream which will annotate resource bundles. Bundles named Bundle*.properties will be treated as localizable by default, and so annotated; other bundles will be treated as nonlocalizable and not annotated. Messages can be individually marked as localizable or not to override this default, in accordance with some I18N conventions for NetBeans.

base - the unannotated stream
id - an identifying number to use in annotations
localizable - if true, this bundle is expected to be localizable
See Also:
Method Detail


public int read()
Specified by:
read in class