60 |
* |
* |
61 |
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) |
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) |
62 |
*/ |
*/ |
63 |
class universalHolder |
public class universalHolder |
64 |
implements Streamable |
implements Streamable |
65 |
{ |
{ |
66 |
/** |
/** |
71 |
/** |
/** |
72 |
* Create the universal holder that uses the given buffer to store the data. |
* Create the universal holder that uses the given buffer to store the data. |
73 |
*/ |
*/ |
74 |
universalHolder(cdrBufOutput buffer) |
public universalHolder(cdrBufOutput buffer) |
75 |
{ |
{ |
76 |
value = buffer; |
value = buffer; |
77 |
} |
} |
154 |
{ |
{ |
155 |
return value.create_input_stream(); |
return value.create_input_stream(); |
156 |
} |
} |
157 |
} |
|
158 |
|
/** |
159 |
|
* Clone. |
160 |
|
*/ |
161 |
|
public universalHolder Clone() |
162 |
|
{ |
163 |
|
try |
164 |
|
{ |
165 |
|
cdrBufOutput nb = new cdrBufOutput(value.buffer.size()); |
166 |
|
value.buffer.writeTo(nb); |
167 |
|
return new universalHolder(nb); |
168 |
|
} |
169 |
|
catch (IOException ex) |
170 |
|
{ |
171 |
|
throw new Unexpected(ex); |
172 |
|
} |
173 |
|
} |
174 |
|
} |