undent one file, given an open BufferedReader.
Undent by removing UP TO "nSpaces" leading spaces.
//+
// GRRR THIS DOES NOT QUITE WORK - FIX -- Ian
try {
String inputLine;
while ((inputLine = is.readLine()) != null) {
int i;
for (i=0; i<nSpaces; i++) {
if (!Character.isWhitespace(inputLine.charAt(i)))
break;
}
System.out.println(inputLine.substring(i));
}
is.close();
//-
} catch (IOException e) {
System.out.println("IOException: " + e);
}