org.openide.util
Class NbBundle.DebugLoader.DebugInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.openide.util.NbBundle.DebugLoader.DebugInputStream
All Implemented Interfaces:
java.io.Closeable
Enclosing class:
NbBundle.DebugLoader

static final class NbBundle.DebugLoader.DebugInputStream
extends java.io.InputStream

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(java.io.InputStream base, int id, boolean localizable)
          Create a new InputStream which will annotate resource bundles.
 
Method Summary
 int read()
           
 
Methods inherited from class java.io.InputStream
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

NbBundle.DebugLoader.DebugInputStream

public NbBundle.DebugLoader.DebugInputStream(java.io.InputStream 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.

Parameters:
base - the unannotated stream
id - an identifying number to use in annotations
localizable - if true, this bundle is expected to be localizable
See Also:
http://www.netbeans.org/i18n/
Method Detail

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException