1 package org.jastacry.layer;
2
3 import java.io.IOException;
4 import java.io.InputStream;
5 import java.io.OutputStream;
6 import java.util.Objects;
7
8 import org.jastacry.JastacryException;
9
10
11
12
13
14
15
16
17 public class TransparentLayer extends AbstractBasicLayer
18 {
19
20
21
22 public static final String LAYERNAME = "Transparent Layer";
23
24
25
26
27 public TransparentLayer()
28 {
29 super(TransparentLayer.class, LAYERNAME);
30 }
31
32
33
34
35
36
37
38
39 public final void encodeAndDecode(final InputStream inputStream, final OutputStream outputStream) throws JastacryException
40 {
41 try
42 {
43 int iChar;
44 while ((iChar = inputStream.read()) != -1)
45 {
46 outputStream.write(iChar);
47 }
48 logger.info("close pipe");
49 outputStream.close();
50 }
51 catch (IOException e)
52 {
53 throw (JastacryExceptionl#JastacryException">JastacryException) new JastacryException("encodeAndDecode failed").initCause(e);
54 }
55 }
56
57
58
59
60
61
62 @Override
63 public final void init(final String data)
64 {
65
66 }
67
68
69
70
71
72
73 @Override
74 public boolean equals(final Object o)
75 {
76 return o == this || o instanceof TransparentLayer;
77 }
78
79
80
81
82
83 @Override
84 public int hashCode()
85 {
86 return Objects.hash();
87 }
88 }