1 package com.srv4pos.commons.io;
2
3 import com.srv4pos.server.api.infrastructure.ConnectionWriter;
4
5 import java.io.IOException;
6 import java.io.InputStream;
7 import java.io.OutputStream;
8
9
10
11
12
13 public class InputStreamConnectionWriter implements ConnectionWriter {
14 private InputStream inputStream;
15
16
17
18
19
20 public InputStreamConnectionWriter(InputStream inputStream) {
21 this.inputStream = inputStream;
22 }
23
24
25
26
27
28
29 public void write(OutputStream outputStream) throws IOException {
30 IOUtils.copy(inputStream, outputStream);
31 }
32
33
34
35
36
37 public Integer getContentLength() {
38 return null;
39 }
40 }