T
tom.krier
Here's the thing. I am downloading a tiff image through an http
stream, then I am converting it to a byte array, then I convert it to a
string which I place in an XML file. When I place the string in the
xml file it is super long (slows down all editors when opening), so I
was thinking to insert vbCrLf every 80 characters or so but I don't
want to slow down my program that creates the XML file. I was
wondering the best way to accomplish that. Here is my current code:
xmlWriter.WriteString(getBase64Document(loan))
Private Function getBase64Document(ByVal loan As MtgLoan) As String
Dim httpStream As System.Net.WebClient = New Net.WebClient()
Dim bytes As Byte() =
httpStream.DownloadData(loan.ICMBASE(0).resourceObject.URL.value) 'This
pulls in the image as a byte()
Dim base64String As String = Convert.ToBase64String(bytes)
Return base64String
End Function
stream, then I am converting it to a byte array, then I convert it to a
string which I place in an XML file. When I place the string in the
xml file it is super long (slows down all editors when opening), so I
was thinking to insert vbCrLf every 80 characters or so but I don't
want to slow down my program that creates the XML file. I was
wondering the best way to accomplish that. Here is my current code:
xmlWriter.WriteString(getBase64Document(loan))
Private Function getBase64Document(ByVal loan As MtgLoan) As String
Dim httpStream As System.Net.WebClient = New Net.WebClient()
Dim bytes As Byte() =
httpStream.DownloadData(loan.ICMBASE(0).resourceObject.URL.value) 'This
pulls in the image as a byte()
Dim base64String As String = Convert.ToBase64String(bytes)
Return base64String
End Function