mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 21:31:36 +02:00
pushFailsOnFirstStageOutOfDate integration test.
This commit is contained in:
@@ -152,12 +152,14 @@ public class Util {
|
||||
}
|
||||
}
|
||||
|
||||
public static String fromStream(InputStream in) throws IOException
|
||||
{
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
|
||||
public static String fromStream(InputStream stream, int skip) throws IOException {
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
|
||||
StringBuilder out = new StringBuilder();
|
||||
String newLine = System.getProperty("line.separator");
|
||||
String line;
|
||||
for (int i = 0; i < skip; i++) {
|
||||
reader.readLine();
|
||||
}
|
||||
while ((line = reader.readLine()) != null) {
|
||||
out.append(line);
|
||||
out.append(newLine);
|
||||
@@ -165,4 +167,8 @@ public class Util {
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
public static String fromStream(InputStream stream) throws IOException {
|
||||
return fromStream(stream, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user