🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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[]
#302
Author: Oliver Young
Date: Wed, 07 Jan 2004 14:38
7 lines
964 bytes
    I need something like this:

byte[] b = new byte[howMuch???];
b = LoadFile("c:\\my_file");

Thank you.
Re: load file into byte[]
#303
Author: Kevin Dean
Date: Wed, 07 Jan 2004 14:52
26 lines
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[]
#304
Author: Tor Iver Wilhelmsen (TeamB)
Date: Wed, 07 Jan 2004 15:11
9 lines
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