If you are storing character data than there is nothing to do, note that GlobalCharacter is a super class of GlobalBinary.
Set Text(1) = "This is line one of some text."
Set Text(2) = "This is line two of some text."
Set Text(3) = "This is line three of some text."
Set stream = ##class(%Stream.GlobalBinary).%New()
For i=1:1:3 Do stream.WriteLine(Text(i))
Do stream.Rewind()
While ('stream.AtEnd) { Write !,stream.ReadLine() }
Do stream.Rewind()
Set chars = ##class(%Stream.GlobalCharacter).%New()
Do chars.CopyFrom(stream)
Do chars.Rewind()
While ('chars.AtEnd) { Write !,chars.ReadLine() }
Output:
This is line one of some text.
This is line two of some text.
This is line three of some text.
This is line one of some text.
This is line two of some text.
This is line three of some text.