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
Power Lifting Lever Belt
SkullVamp
Updated:
Jun 13, 2026
Ad icon
port.lk Domain for sale
Lankan-Tech
Updated:
Jun 13, 2026
Colombo
Kaduwela - Two Storey House for Sale
dilrasan
Updated:
Jun 11, 2026
Ad icon
Wechat qr verification
Pawan2005
Updated:
Jun 11, 2026
🚀 GOOGLE AI PRO 18 MONTHS ACTIVATION 🚀
sayuru bandara
Updated:
Jun 10, 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
Haya warak paha keeyada? (haya wadi kireema paha)
Post reply
Top
Bottom