how to fill the string to length = 256



Now, I am using below code, how to fill the string to length = 256 or more ?
inputLine = inputLine.substring(0,inputLine.length()) +
" " +
" " +
" "


/* decode 23.18.14

javac decode_mrp.java

*/
import java.io.*;

public class decode_mrp {
public static void main(String[] args) throws IOException {
String inputLine , outputLine;
String item,site;
BufferedReader in
= new BufferedReader(new FileReader(args[0]));

while ((inputLine = in.readLine()) != null) {

inputLine = inputLine.substring(0,inputLine.length()) +
" " +
" " +
" "
;
// System.out.println(inputLine.substring(2,14) + "<");
if (inputLine.substring(2,14).equals("Item Number:")) {
item = inputLine.substring(15,29);
site = inputLine.substring(121,129 );
System.out.println(item + " " + site);

}
}

}

}


.



Relevant Pages

  • Re:Read file in the jar file?
    ... public static void mainthrows Exception ... BufferedReader bf = new BufferedReader( ... I compress the compiled A and a.txt in the jar file. ...
    (comp.lang.java.programmer)
  • Re: Read file in the jar file?
    ... public static void mainthrows Exception ... A app = new A; ... BufferedReader bf = new BufferedReader( ... Exception in thread "main" java.lang.NullPointerException ...
    (comp.lang.java.programmer)
  • Re: Reading a file FileReader, doesnt read a file
    ... public class Main ... public static void main ... BufferedReader br = new BufferedReader(new ...
    (comp.lang.java.help)