Re: [Vala] Reading/writing a specific amount of bytes
- From: Luca Bruno <lethalman88 gmail com>
- To: Christoph Mende <angelos gentoo org>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Reading/writing a specific amount of bytes
- Date: Tue, 14 Jun 2011 09:10:05 +0200
On Mon, Jun 13, 2011 at 09:04:14PM +0200, Christoph Mende wrote:
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?
uint8[] data = new uint8[4096]; Then pass it to read() and it should work.
--
http://www.debian.org - The Universal Operating System
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]