private String makeHeader ( GempakStation stn , String date ) { StringBuilder builder = new StringBuilder ( ) ; builder . append ( "STID = " ) ; builder . append ( StringUtil2 . padRight ( ( stn . getSTID ( ) . trim ( ) + stn . getSTD2 ( ) . trim ( ) ) , 8 ) ) ; builder . append ( "\t" ) ; builder . append ( "STNM = " ) ; builder . append ( Format . i ( stn . getSTNM ( ) , 6 ) ) ; builder . append ( "\t" ) ; builder . append ( "TIME = " ) ; builder . append ( date ) ; builder . append ( "\n" ) ; builder . append ( "SLAT = " ) ; builder . append ( Format . d ( stn . getLatitude ( ) , 5 ) ) ; builder . append ( "\t" ) ; builder . append ( "SLON = " ) ; builder . append ( Format . d ( stn . getLongitude ( ) , 5 ) ) ; builder . append ( "\t" ) ; builder . append ( "SELV = " ) ; builder . append ( Format . d ( stn . getAltitude ( ) , 5 ) ) ; builder . append ( "\n" ) ; return builder . toString ( ) ; }
Make the header for the text report