[Vala] reading and writing binary data
- From: jezra lickter <jezra lickter gmail com>
- To: vala-list gnome org
- Subject: [Vala] reading and writing binary data
- Date: Mon, 26 Jan 2009 18:52:25 -0800
Hello,
I am using GNet to read data from a file over http and then write the
data to a local file. Everything works fine when I am reading a text
file but when I read some sort of binary file the data gets corrupted.
I believe the problem is caused by Vala converting the data
that I read into a UTF8 string. One way to fix this problem is to read
the data as a GLib.ByteArray but I couldn't find a way to iterate over
ByteArray and extract a single byte. It may also be possible to pull
the raw string data from the Vala string. Unfortunately I don't know
how to do this. Any advice regarding reading and writing binary data
would be greatly appreciated.
jezra
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]