JavaÖÐFile,byte[],Object¼äµÄת»»
Ò»¡¢ÓÐÁ½µãÐèҪעÒ⣺
1¡¢Object ¶ÔÏó±ØÐëÊÇ¿ÉÐòÁл¯¶ÔÏó ¡£
2¡¢¿ÉÐòÁл¯µÄ Object
¶ÔÏ󶼿ÉÒÔת»»ÎªÒ»¸ö´ÅÅÌÎļþ£»·´¹ýÀ´Ôò²»Ò»¶¨³ÉÁ¢£¬Ö»ÓÐÐòÁÐ
»¯Îļþ²Å¿ÉÒÔת»»Îª Object ¶ÔÏó¡£
¶þ¡¢Ïà¹ØµÄת»»·½·¨£º
import
java.io.BufferedOutputStream;
import
java.io.ByteArrayInputStream;
import
java.io.ByteArrayOutputStream;
import
java.io.File;
import
java.io.FileInputStream;
import
java.io.FileOutputStream;
import
java.io.IOException;
import
java.io.ObjectInputStream;
import
java.io.ObjectOutputStream;
import
java.io.Serializable;
public
class
Byte_File_Object
...
{
/** */
/**
* Îļþת»¯Îª×Ö½ÚÊý×é
* @Author Sean.guo
* @EditTime 2007-8-13 ÉÏÎç11:45:28
*/
public
static
byte
[] getBytesfromFile(File f)
...
{
if
(f
==
null
)
...
{
return
null
;
}
try
...
{
FileInputStream stream
=
new
FileInputStream(f);
ByteArrayOutputStream out
=
new
ByteArrayOutputStream(
1000
);
byte
[] b
=
new
byte
[
1000
];
 
Ïà¹ØÎĵµ£º
ÔÚAndroidµÄÓ¦ÓóÌÐò¿ª·¢ÖУ¬Í¨³£Ê¹ÓõÄÊÇJAVAÓïÑÔ£¬³ýÁËÐèÒªÊìϤJAVAÓïÑԵĻù´¡ÖªÊ¶Ö®Í⣬»¹ÐèÒªÁ˽âAndroidÌṩµÄÀ©Õ¹µÄJAVA¹¦ÄÜ¡£
ÔÚÒ»°ãµÄJAVAÓ¦ÓÃÖУ¬Èç¹ûÐèÓÃÒýÓûù´¡Àà¿â£¬Í¨³£ÐèҪʹÓÃÈçϵķ½Ê½£º
import
javax.swing.*;
ÒÔÉÏ´úÂë±íʾÁËÒýÓÃJAVAµÄGUI×é¼þSwing,javax.swing¼´JAVAÖеÄÒ»¸ö°ü¡£
androidÌá¹©Ò ......
Ò»¡¢Òý×Ó
»°ËµÊ®Äêǰ£¬ÓÐÒ»¸ö±¬·¢»§£¬Ëû¼ÒÓÐÈýÁ¾Æû³µ£¨Benz£¨±¼³Û£©¡¢Bmw£¨±¦Âí£©¡¢Audi£¨°ÂµÏ£©¿´À´ÕâÈ˱Ƚϰ®¹ú£¬Ã»ÓÐÈÕ±¾³µ£©£¬»¹¹ÍÁË˾»úΪËû¿ª³µ¡£²»¹ý£¬±¬·¢»§×ø³µÊ±×ÜÊÇÕâÑù£ºÉÏBenz³µºó¸ú˾»ú˵"¿ª±¼³Û³µ£¡"£¬×øÉÏBmwºóËû˵"¿ª±¦Âí³µ£¡"£¬×øÉÏAudiºóËû˵"¿ª°ÂµÏ³µ£¡"¡£ÄãÒ»¶¨Ëµ£ºÕâÈËÓв¡£¡Ö±½Ó˵¿ª³µ²»¾ÍÐÐÁË£¿£¡ ......
ÔÚ²âÊÔ
ConsoleRunner
µÄ¹ý³ÌÖз¢ÏÖÒ»¸öÓÐÒâ˼µÄÏÖÏó£¬Ò»¶ÎºÜ¼òµ¥µÄ
C
³ÌÐò£º
#include <stdio.h>
#include <windows.h>
int main() {
int i = 0;
for (;;) {
printf("%d\n", i++); ......
¿ìÅÅ£º¿ìËÙÅÅÐò£¬ÄѶȲ»ÊÇÌ«´ó£¬µ«ÊÇÊÇÎÒ¾³£°ÑÍæµÄС´úÂëÖ®Ò»£¬ÒýÓÿìÅÅ´úÂ봴ʼÈ˵ÄÒ»¾ä»°“Òª²»ÊǼòÁ·ÓÖÃ÷ÏÔûÓдíÎó£¬Òª²»ÊǸ´ÔÓûÓÐÃ÷ÏԵĴíÎó”
ÆðÒò£º
Ö÷ÒªÊÇǰһÕó¿´ÁõÈê¼ÑµÄ¡¶Ëã·¨ÒÕÊõÓëÐÅϢѧ¾ºÈü¡·P73Ò³£¬ÅöÇÉÎÒÓÖÇ×ÊÖдÁËÒ»±éÄÇÊéÉϵIJâÊÔÁËһϣ¬·¢ÏÖ¾¹È»ÊÇ´íÎóµÄ£¬È»ºóÎÒÓÖ²âÊÔÁËÒ»ÏÂÎÒÒÔÇ ......
ºÜ¶àÍøÓÑ×ÉѯѧϰJavaÓÐûÓÐʲô½Ý¾¶,ÎÒ˵“ÎÞËû£¬Î¨ÊÖÊì¶û”¡£µ«ÊÇÉÐѧÌÃÔ¸Ò⽫һЩ¾Ñéд³öÀ´£¬ÒÔ±ãºóÀ´ÕßÉÙ×ßÍä·,°ïÖú±ðÈËÊÇ×î´óµÄ¿ìÀÖÂ
ÒªÏëѧºÃJava£¬Ê×ÏÈÒªÖªµÀJavaµÄ´óÖ·ÖÀà¡£ÎÒÃÇÖªµÀ£¬×Ô´ÓSunÍÆ³öJavaÒÔÀ´£¬¾ÍÁ¦Í¼Ê¹Ö®ÎÞËù²»°ü£¬ËùÒÔJava·¢Õ¹µ½ÏÖÔÚ£¬°´Ó¦ÓÃÀ´·ÖÖ÷Òª·ÖΪÈý´ó¿é£ºJ2SE,J2MEºÍJ2EE, ......