private InputStream nextLine() throws IOException {
		try {
			String line = null;
			while (lines != null && line == null) {
				line = lines.poll(1L, TimeUnit.SECONDS);
			}
			if (line != null) {
				return new ByteArrayInputStream((line.endsWith("\n") ? line : line + '\n').getBytes());
			} else {
				return new ByteArrayInputStream("".getBytes());
			}
		} catch (InterruptedException e) {
			throw new IOException(e);
		}
	}