Sha256: 96663583c6389ed1afac09377b665b7dcdcd9d0376fd0d875bfa9d6a6002e7a4
Contents?: true
Size: 979 Bytes
Versions: 14
Compression:
Stored size: 979 Bytes
Contents
package gherkin; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.util.List; public class FixJava { public static String join(List<String> strings, String separator) { StringBuffer sb = new StringBuffer(); int i = 0; for (String s : strings) { if (i != 0) sb.append(separator); sb.append(s); i++; } return sb.toString(); } public static String readResourceAsString(String filePath) throws IOException { Reader machine = new InputStreamReader(FixJava.class.getResourceAsStream(filePath)); final char[] buffer = new char[0x10000]; StringBuilder out = new StringBuilder(); int read; do { read = machine.read(buffer, 0, buffer.length); if (read > 0) { out.append(buffer, 0, read); } } while (read >= 0); return out.toString(); } }
Version data entries
14 entries across 14 versions & 1 rubygems