| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttribble.text.PictureFormat
Picture-string format.
Picture Specifications
    (n)     ---     Repeat factor
    0       ANE     Insert '0'
    9       AN      Digit
    A       A       Alphabetic character or space
    B       ANE     Space (blank)
    CR       NE     Sign, 'CR' is negative, else spaces
    DB       NE     Sign, 'DB' is negative, else spaces
    E        NEF    Floating exponent
    G       A  W    Wide (16-bit) alphanumeric character
    P        N      Implied digit
    S        N      Implied sign
    V        N      Implied decimal point
    X       A       Alphanumeric character
    Z        NE     Floating leading digit
    *        NE     Leading '*' fill character or digit
    -        NE     Sign
    +        NE     Sign, '+' or '-'
    /       ANE     Insert '/'
    .        NE     Decimal point
    ,        NE     Digit group separator
    $        NE     Floating '$'
 
 
| Field Summary | |
| static short | FL_ALNUM | 
| static short | FL_ALPHA | 
| static short | FL_EDITED | 
| static short | FL_FLOAT | 
| static short | FL_NUM | 
| static char | PIC_ALNUM | 
| static char | PIC_ALPHA | 
| static char | PIC_CR | 
| static char | PIC_CR2 | 
| static char | PIC_CURRENCY | 
| static char | PIC_DASH | 
| static char | PIC_DB | 
| static char | PIC_DB2 | 
| static char | PIC_DIGIT | 
| static char | PIC_FILL | 
| static char | PIC_FL_DIGIT | 
| static char | PIC_PLUS | 
| static char | PIC_POINT | 
| static char | PIC_REP_L | 
| static char | PIC_REP_R | 
| static char | PIC_SEP | 
| static char | PIC_SLASH | 
| static char | PIC_SPACE | 
| static char | PIC_ZERO | 
| Constructor Summary | |
| PictureFormat(java.lang.String pic)Constructor. | |
| Method Summary | |
|  int | format(long n,
       char[] buf,
       int off)Format a numeric value. | 
|  int | format(java.lang.Object obj,
       java.lang.StringBuffer buf,
       java.text.FieldPosition pos)Format an object into a string. | 
|  int | format(java.lang.String s,
       char[] buf,
       int off)Format a character string value. | 
|  int | getInputLength()Determine the length of the source value required by this format. | 
|  int | getOutputLength()Determine the formatted length produced by this format. | 
| static void | main(java.lang.String[] args)Test driver. | 
|  java.lang.String | parseObject(java.lang.String src,
            java.text.ParsePosition pos) | 
|  char | setFillChar(char ch)Establish the fill character. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static final char PIC_ALNUM
public static final char PIC_ALPHA
public static final char PIC_CURRENCY
public static final char PIC_CR
public static final char PIC_CR2
public static final char PIC_DB
public static final char PIC_DB2
public static final char PIC_DIGIT
public static final char PIC_FL_DIGIT
public static final char PIC_FILL
public static final char PIC_POINT
public static final char PIC_REP_L
public static final char PIC_REP_R
public static final char PIC_SEP
public static final char PIC_DASH
public static final char PIC_PLUS
public static final char PIC_SLASH
public static final char PIC_SPACE
public static final char PIC_ZERO
public static final short FL_NUM
public static final short FL_ALPHA
public static final short FL_ALNUM
public static final short FL_EDITED
public static final short FL_FLOAT
| Constructor Detail | 
public PictureFormat(java.lang.String pic)
              throws FormatException
pic - Picture specification string.
FormatException - Thrown if pic is malformed.
java.lang.NullPointerException - (unchecked)
 Thrown if pic is null.| Method Detail | 
public static void main(java.lang.String[] args)
public int getOutputLength()
public int getInputLength()
public char setFillChar(char ch)
ch - Fill character.
public int format(java.lang.Object obj,
                  java.lang.StringBuffer buf,
                  java.text.FieldPosition pos)
obj - An object to format.buf - Target buffer to be filled with the formatted result.
FormatException - Thrown if an error occurs while formatting the value.
public java.lang.String parseObject(java.lang.String src,
                                    java.text.ParsePosition pos)
public int format(java.lang.String s,
                  char[] buf,
                  int off)
           throws FormatException
s - Character string value to format.buf - Target buffer to be filled with the formatted result.off - Index of the first character within buf to write to.
FormatException - Thrown if an error occurs while formatting the value.
public int format(long n,
                  char[] buf,
                  int off)
           throws FormatException
n - Numeric value to format.buf - Target buffer to be filled with the formatted result.off - Index of the first character within buf to write to.
FormatException - Thrown if an error occurs while formatting the value.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||