Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Puffin Rock Characters Plush Toy Set
anil1961
Updated:
Saturday at 3:51 PM
Toyota Vitz scp10 For Sale
Lakmal Bandara
Updated:
Wednesday at 10:50 AM
Kandy
Welcome all my all new pet shop Bark.lk
dilumrane
Updated:
Nov 2, 2026
Windows RDP Only Rs.500 a month
Blogerwiki
Updated:
Nov 1, 2026
Ad icon
V2ray VPN for Tunneling
hu KANNA
Updated:
Oct 22, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
Java Help file download
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="DjSpK" data-source="post: 18280853" data-attributes="member: 139923"><p>[CODE] byte[] buf = new byte[1024];[/CODE]</p><p>Fixed Size Byte Array එකක්. මෙකෙන් කරන්නේ කොච්චර Bytes ප්රමාණයක් එක වරකට Response Stream එකෙන් Read කරනවද කියන එක. එත් 1024 Bytes ප්රමාණය එක පාරම ගන්න බැරිනම් (Slow Connection) . ඊට අඩු Bytes ප්රමාණයක් Read කරණවා.</p><p>[CODE] int bytesRead;[/CODE]</p><p>මෙතනදි දැනට කොපමණ Bytes ප්රමානයක් Read කරාද කියලා Store කරගන්නවා. කලින් කිව්වා වාගේ 1024 Bytes Buffer කරගන්න බැරිවුනොත්. පුළුවන් ප්රමානය ගන්නවා එ ගත්ත ප්රමාණය ඔය Variable එකේ Store වෙනවා.</p><p>[CODE]while ((bytesRead = is.read(buf)) != -1) {[/CODE]</p><p>මෙතනදි EOF(End OF File) වෙනකන් Response Stream එක Read කරණවා. BytesRead = -1 වෙනවා කියන්නේ File එක Read වෙලා ඉවරයි.</p><p>[CODE] fos.write(buf, 0, bytesRead);[/CODE]</p><p>Fso කියන Steam එකට ගත්ත Bytes ප්රමාණය Write කරණවා.</p><p><strong>Eg:</strong></p><p>[CODE]byte[] buf = new byte[1024];[/CODE]</p><p>buf = {90,60,45,20}; Read 4 Bytes </p><p>bytesread = 4</p><p>fso.write(buf(90,60,45,20),0,bytesread(size of current buffer =4))</p></blockquote><p></p>
[QUOTE="DjSpK, post: 18280853, member: 139923"] [CODE] byte[] buf = new byte[1024];[/CODE] Fixed Size Byte Array එකක්. මෙකෙන් කරන්නේ කොච්චර Bytes ප්රමාණයක් එක වරකට Response Stream එකෙන් Read කරනවද කියන එක. එත් 1024 Bytes ප්රමාණය එක පාරම ගන්න බැරිනම් (Slow Connection) . ඊට අඩු Bytes ප්රමාණයක් Read කරණවා. [CODE] int bytesRead;[/CODE] මෙතනදි දැනට කොපමණ Bytes ප්රමානයක් Read කරාද කියලා Store කරගන්නවා. කලින් කිව්වා වාගේ 1024 Bytes Buffer කරගන්න බැරිවුනොත්. පුළුවන් ප්රමානය ගන්නවා එ ගත්ත ප්රමාණය ඔය Variable එකේ Store වෙනවා. [CODE]while ((bytesRead = is.read(buf)) != -1) {[/CODE] මෙතනදි EOF(End OF File) වෙනකන් Response Stream එක Read කරණවා. BytesRead = -1 වෙනවා කියන්නේ File එක Read වෙලා ඉවරයි. [CODE] fos.write(buf, 0, bytesRead);[/CODE] Fso කියන Steam එකට ගත්ත Bytes ප්රමාණය Write කරණවා. [B]Eg:[/B] [CODE]byte[] buf = new byte[1024];[/CODE] buf = {90,60,45,20}; Read 4 Bytes bytesread = 4 fso.write(buf(90,60,45,20),0,bytesread(size of current buffer =4)) [/QUOTE]
Insert quotes…
Verification
Asuwa dahayen wadi kalama keeyada?
Post reply
Top
Bottom