Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
LLVAlue clone
Philippe Gauvin
How do we clone an LLValue object?
Find more posts tagged with
Comments
Louis_Routhier
Here is what I use in a VB.NET project.Friend Shared Function CloneLLValue(ByVal Value As LLValue) As LLValueNET Trace.WriteLine("CloneLLValue Started", "LLMRQ") Dim startTime As DateTime = DateTime.Now() Dim returnValue As LLValueNET Dim OutStream As New java.io.ByteArrayOutputStream Dim LLOut As New com.opentext.api.LLOutputStream(OutStream) 'Get string from the LLValue object 'TODO:Regarder Value.Write et Value.Read Value.format(LLOut) Dim InStream As New java.io.ByteArrayInputStream(OutStream.toByteArray()) Dim PBS As New java.io.PushbackInputStream(InStream) Dim LLIn As New com.opentext.api.LLInputStream(PBS) 'And write it back into a brand new LLValue object returnValue = New LLValueNET(LLValue.crack(LLIn)) LLIn.close() PBS.close() InStream.close() LLOut.close() OutStream.close() Trace.WriteLine(String.Format("CloneLLValue ended in {0}ms", DateTime.Now.Subtract(startTime).TotalMilliseconds), "LLMRQ") Return returnValueEnd Function