Article View: borland.public.jbuilder.java.api
Article #303Re: load file into byte[]
From: 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.
>
>
Technical Details
Message-ID:
<3ffc1e10$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3ffc1a01@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,e260f9e1ced8bb2f X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2004-01-07 07:09:54 PST From: "Kevin Dean" <NkOdSePaAnM@datadevelopment.com> Newsgroups: borland.public.jbuilder.java.api References: <3ffc1a01@newsgroups.borland.com> Subject: Re: load file into byte[] Date: Wed, 7 Jan 2004 09:52:48 -0500 Lines: 28 Organization: Dolphin Data Development Ltd. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 24.57.150.243 Message-ID: <3ffc1e10$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1073487376 24.57.150.243 (7 Jan 2004 06:56:16 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail