Changeset 129:ab48e61bc848 in livinglogic.java.ul4

Show
Ignore:
Timestamp:
07/07/08 21:59:17 (11 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

More javadoc.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/src/com/livinglogic/ul4/Template.java

    r128 r129  
    262262    } 
    263263 
     264    /** 
     265     * Reads a (non-negative) integer value from a stream. 
     266     * @param reader the reader from which the value is read. 
     267     * @param terminator The character after the digits of the integer value 
     268     * @return The integer value 
     269     * @throws IOException if reading from the stream fails 
     270     * @throws RuntimeException if the integer value is malformed (i.e. the 
     271     *                          terminator is missing) 
     272     */ 
    264273    protected static int readint(Reader reader, char terminator) throws IOException 
    265274    { 
     
    272281    } 
    273282 
     283    /** 
     284     * Reads a string value (or <code>null</code>) from a stream. 
     285     * <code>readstr</code> is the inverse operation of {@link writestr}. 
     286     * @param reader the reader from which the string is read. 
     287     * @param terminator The terminator character that was used in {@link writestr}. 
     288     * @return The string or <code>null</code> 
     289     * @throws IOException if reading from the stream fails 
     290     * @throws RuntimeException if the integer value is malformed 
     291     */ 
    274292    protected static String readstr(Reader reader, char terminator) throws IOException 
    275293    { 
     
    289307    } 
    290308 
     309    /** 
     310     * Reads a register specification from a stream. A register specification is 
     311     * either a digit or the character '-'. 
     312     * @param reader the reader from which the specification is read. 
     313     * @return The register number or -1. 
     314     * @throws IOException if reading from the stream fails 
     315     * @throws RuntimeException if the register specification is malformed 
     316     */ 
    291317    protected static int readspec(Reader reader) throws IOException 
    292318    { 
     
    317343    } 
    318344 
     345    /** 
     346     * Reads a register specification from a stream. A register specification is 
     347     * either a digit or the character '-'. 
     348     * @param reader the reader from which the specification is read. 
     349     * @return The register number or -1. 
     350     * @throws IOException if reading from the stream fails 
     351     * @throws RuntimeException if the character read from the stream is not a 
     352     *                          linefeed 
     353     */ 
    319354    protected static void readcr(Reader reader) throws IOException 
    320355    { 
     
    460495 
    461496    /** 
    462      * writes an int to a stream in such a way that the int can be reliable read again. 
     497     * writes an int to a stream in such a way that the int can be reliable read 
     498     * again. This is done by writing the digits of the integer followed by a 
     499     * terminator character (that may not be a digit). 
    463500     * @param writer the stream to which to write. 
    464501     * @param value the int value to be written.