/** * Reads the text block. */ private static String readTextBlock(InputStream in) throws IOException { StringBuilder buf = new StringBuilder(); while(true) { String line = readLine(in); if(line.equals(".")) return buf.toString(); // end of it if(line.startsWith("..")) buf.append(line.substring(1)); else buf.append(line); buf.append('\n'); } }
/** * Reads the text block. */ private static String readTextBlock(InputStream in) throws IOException { StringBuilder buf = new StringBuilder(); while (true) { String line = readLine(in); if (line.equals(".")) { return buf.toString(); // end of it } if (line.startsWith("..")) { buf.append(line.substring(1)); } else { buf.append(line); } buf.append('\n'); } } private static final Logger LOGGER = Logger.getLogger(EmbeddedSu.class.getName());