public static Document processSync(URL pipelineUrl, InputStream docStream) throws EnrycherException {
		try {
			HttpURLConnection connection =
				(HttpURLConnection)pipelineUrl.openConnection();
			connection.setRequestMethod("POST");
			connection.setConnectTimeout(timeout);
			connection.setReadTimeout(timeout);
			// serialize the input
			connection.setDoOutput(true);
			OutputStream outputStream = connection.getOutputStream();
			byte[] buf = new byte[8192];
			while (true) {
				int length = docStream.read(buf);
				if (length < 0) { break; }
				outputStream.write(buf, 0, length);
			}
			// execute the connection
			connection.connect();
			// read response
			return new Document(connection.getInputStream());
		} catch (MalformedURLException e) {
			throw new EnrycherException(e);
		} catch (IOException e) {
			throw new EnrycherException(e);
		}
	}