/** * Extract a String from the list and open a BufferedReader that can read from it */ protected BufferedReader getBufferedReader(List<String> strings, int index) { String string = strings.get(index); return LocationUtils.getBufferedReaderFromString(string); }
/** * Extract a String from the list and open a BufferedReader that can read from it */ protected BufferedReader getBufferedReader(List<String> strings, int index) { String string = strings.get(index); return LocationUtils.getBufferedReaderFromString(string); }
public static SqlMetaData getSqlMetaData(String sql, SqlReader reader) { BufferedReader in = null; try { in = LocationUtils.getBufferedReaderFromString(sql); return MetaDataUtils.getSqlMetaData(in, reader); } catch (IOException e) { throw new IllegalStateException(e); } finally { IOUtils.closeQuietly(in); } }
/** * Get the contents of <code>s</code> as a list of <code>String's</code> one entry per line */ public static final List<String> readLinesFromString(String s) { Reader reader = getBufferedReaderFromString(s); return readLinesAndClose(reader); }
protected SqlMetaData getMetaData(String sql) { BufferedReader in = null; try { in = LocationUtils.getBufferedReaderFromString(sql); return JdbcUtils.getSqlMetaData(in, reader); } catch (IOException e) { throw new IllegalStateException(e); } finally { IOUtils.closeQuietly(in); } }
public static List<String> getOutputLines(Result result) { try { return IOUtils.readLines(LocationUtils.getBufferedReaderFromString(result.getStdout())); } catch (IOException e) { throw new IllegalArgumentException("Unexpected IO error", e); } }