diff options
Diffstat (limited to 'libjava/classpath/gnu/CORBA/universalHolder.java')
| -rw-r--r-- | libjava/classpath/gnu/CORBA/universalHolder.java | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/libjava/classpath/gnu/CORBA/universalHolder.java b/libjava/classpath/gnu/CORBA/universalHolder.java index 6d8b7747290..c20dac442dd 100644 --- a/libjava/classpath/gnu/CORBA/universalHolder.java +++ b/libjava/classpath/gnu/CORBA/universalHolder.java @@ -60,7 +60,7 @@ import java.io.IOException; * * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) */ -class universalHolder +public class universalHolder implements Streamable { /** @@ -71,7 +71,7 @@ class universalHolder /** * Create the universal holder that uses the given buffer to store the data. */ - universalHolder(cdrBufOutput buffer) + public universalHolder(cdrBufOutput buffer) { value = buffer; } @@ -154,4 +154,21 @@ class universalHolder { return value.create_input_stream(); } -} + + /** + * Clone. + */ + public universalHolder Clone() + { + try + { + cdrBufOutput nb = new cdrBufOutput(value.buffer.size()); + value.buffer.writeTo(nb); + return new universalHolder(nb); + } + catch (IOException ex) + { + throw new Unexpected(ex); + } + } +}
\ No newline at end of file |

