how to fill the string to length = 256
- From: <moon_ils-se@xxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 13:29:33 +0800
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);
}
}
}
}
.
- Follow-Ups:
- Re: how to fill the string to length = 256
- From: Roedy Green
- Re: how to fill the string to length = 256
- Prev by Date: Build a Gui for Ant operations
- Next by Date: Re: Comparator.equals()
- Previous by thread: Build a Gui for Ant operations
- Next by thread: Re: how to fill the string to length = 256
- Index(es):
Relevant Pages
|