01: /**
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */package com.tc.util.io;
04:
05: import java.io.BufferedReader;
06: import java.io.IOException;
07: import java.io.Reader;
08:
09: public class BlankLineSkippingBufferedReader extends BufferedReader {
10:
11: public BlankLineSkippingBufferedReader(Reader in, int sz) {
12: super (in, sz);
13: }
14:
15: public BlankLineSkippingBufferedReader(Reader in) {
16: super (in);
17: }
18:
19: public String readLine() throws IOException {
20: String out;
21:
22: do {
23: out = super .readLine();
24: } while (out != null && out.trim().length() == 0);
25:
26: return out;
27: }
28:
29: }
|