Dim f As InputStream
f=File.OpenInput(Main.srvr.StaticFilesFolder,url) ' This points to the correct file, I'm sure.
Dim ba As Int = f.BytesAvailable
Log("Bytes Available for " & url & "=" & ba) ' Shows correct byte size.
Dim buffer(ba) As Byte
f.ReadBytes(buffer,0,buffer.Length)
Dim bc As ByteConverter
Dim bufferText As String
' Tried all sorts here.
'bufferText = bc.StringFromBytes(buffer,"UTF-8")
'bufferText = bc.HexFromBytes(buffer)
'Dim su As StringUtils
'bufferText=su.EncodeBase64(buffer)
resp.ContentType="image/jpeg"
resp.ContentLength=bufferText.Length
resp.Write(bufferText)