Thread View: borland.public.jbuilder.java.api
3 messages
3 total messages
Started by Oliver Young
Wed, 07 Jan 2004 14:38
load file into byte[]
Author: Oliver Young
Date: Wed, 07 Jan 2004 14:38
Date: Wed, 07 Jan 2004 14:38
7 lines
964 bytes
964 bytes
I need something like this:
byte[] b = new byte[howMuch???];
b = LoadFile("c:\\my_file");
Thank you.
Re: load file into byte[]
Author: Kevin Dean
Date: Wed, 07 Jan 2004 14:52
Date: Wed, 07 Jan 2004 14:52
26 lines
1625 bytes
1625 bytes
FileInputStream f = new FileInputStream(/*whatever you need in here to
specify the file*/);
byte[] buffer = new byte[f.available()];
f.read(buffer);
--
Check out our latest white papers at
http://www.datadevelopment.com/papers/index.html
BladeNET Scores With Borland Enterprise Tools
Team Development with JBuilder and Borland Enterprise Server
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
"Oliver Young" <none> wrote in message
news:3ffc1a01@newsgroups.borland.com...
>
> I need something like this:
>
> byte[] b = new byte[howMuch???];
> b = LoadFile("c:\\my_file");
>
> Thank you.
>
>
Re: load file into byte[]
Author: Tor Iver Wilhelmsen (TeamB)
Date: Wed, 07 Jan 2004 15:11
Date: Wed, 07 Jan 2004 15:11
9 lines
987 bytes
987 bytes
"Oliver Young" <none> writes:
> byte[] b = new byte[howMuch???];
java.io.File.size()
> b = LoadFile("c:\\my_file");
java.io.FileInputStream()
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads