[Vala] Reading/writing a specific amount of bytes



Hi,

I'm trying to read from an FileInputStream or write to an
DataOutputStream only a specific amount of bytes (4096 in this case),
both streams contain binary data. I can't find a way to do this though,
OutputStream.write() and InputStream.read() always try to read/write
everything. The only thing I found so far is a FileStream, but I have no
idea how to use FileStream.read() since it's buf parameter is not an out
parameter.
I'd really prefer using a FileInputStream for this task though, is there
any way to do this?

Regards,
Christoph

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]