JavaÖÐInputstreamÓëReaderµÄÇø±ð
JavaÖÐInputstreamÓëReaderµÄÇø±ð
ReaderÖ§³Ö16λµÄUnicode×Ö·ûÊä³ö£¬InputStreamÖ§³Ö8λµÄ×Ö·ûÊä³ö¡£
ReaderºÍInputStream·Ö±ðÊÇI/O¿âÌṩµÄÁ½Ì×ƽÐжÀÁ¢µÄµÈ¼¶»ú¹¹£¬
InputStream¡¢OutputStreamÊÇÓÃÀ´´¦Àí8λԪµÄÁ÷£¬
Reader¡¢WriterÊÇÓÃÀ´´¦Àí16λԪµÄÁ÷¡£
¶øÔÚJAVAÓïÑÔÖУ¬byteÀàÐÍÊÇ8λµÄ£¬charÀàÐÍÊÇ16λµÄ£¬ËùÒÔÔÚ´¦ÀíÖÐÎĵÄʱºòÐèÒªÓÃReaderºÍWriter¡£
ÖµµÃ˵Ã÷µÄÊÇ£¬ÔÚÕâÁ½Öֵȼ¶»ú¹¹Ï£¬»¹ÓÐÒ»µÀÇÅÁºInputStreamReader¡¢OutputStreamWriter¸ºÔð½øÐÐInputStreamµ½ReaderµÄÊÊÅäºÍÓÉOutputStreamµ½WriterµÄÊÊÅä¡£
java.io.Reader ºÍ java.io.InputStream ×é³ÉÁË JavaÊäÈëÀà¡£Reader ÓÃÓÚ¶ÁÈë16λ×Ö·û£¬Ò²¾ÍÊÇ Unicode±àÂëµÄ×Ö·û£»¶ø InputStream ÓÃÓÚ¶ÁÈë ASCII×Ö·ûºÍ¶þ½øÖÆÊý¾Ý¡£
ÔÚ JavaÖУ¬Óв»Í¬ÀàÐ굀 Reader ÊäÈëÁ÷¶ÔÓ¦ÓÚ²»Í¬µÄÊý¾ÝÔ´£º
FileReader ÓÃÓÚ´ÓÎļþÊäÈ룻
CharArrayReader ÓÃÓÚ´Ó³ÌÐòÖеÄ×Ö·ûÊý×éÊäÈ룻
StringReader ÓÃÓÚ´Ó³ÌÐòÖеÄ×Ö·û´®ÊäÈ룻
PipedReader ÓÃÓÚ¶ÁÈ¡´ÓÁíÒ»¸öÏß³ÌÖÐµÄ PipedWriter дÈë¹ÜµÀµÄÊý¾Ý¡£
ÏàÓ¦µÄÒ²Óв»Í¬ÀàÐ굀 InputStream ÊäÈëÁ÷¶ÔÓ¦ÓÚ²»Í¬µÄÊý¾ÝÔ´£ºFileInputStream£¬ByteArrayInputStream£¬StringBufferInputStream£¬PipedInputStream¡£ÁíÍ⣬»¹ÓÐÁ½ÖÖûÓжÔÓ¦ Reader ÀàÐ굀 InputStream ÊäÈëÁ÷£º
Socket ÓÃÓÚÌ×½Ó×Ö£»
URLConnection ÓÃÓÚ URL Á¬½Ó¡£
ÕâÁ½¸öÀàʹÓà getInputStream() À´¶ÁÈ¡Êý¾Ý¡£
ÏàÓ¦µÄ£¬java.io.Writer ºÍ java.io.OutputStream Ò²ÓÐÀàËƵÄÇø±ð¡£
Ïà¹ØÎĵµ£º
È·¶¨ÄãµÄjdk»·¾³±äÁ¿ÅäÖÃÊÇÕýÈ·µÄ¡£
¶ÔÓÚjava³õѧÕßÀ´Ëµ£¬±àÒëºÍÔËÐÐjava³ÌÐòÊÇÒ»¼þºÜÍ·Ì۵Ķ«Î÷¡£
ÏÔÈ»£¬ÔÚÃüÁʽϱàÒëºÍÔËÐÐjava³ÌÐòÓþÃÁË£¬È·ÊµÊǺÜÂé·³£¬
¶øÎÒÃÇÓÖ²»ÏëʹÓôóÐ͵Ŀª·¢¹¤¾ßʱ£¬UltraEditÊÇÒ»¸ö²»´íµÄÑ¡Ôñ£¬
ºÜ¶à³õѧÕ߶¼ÊÇÓÃËüÀ´±àдjavaÔ´ÎļþµÄ£¬¿ÉÒÔ¸ßÁÁ¶ÈÏÔʾ¹Ø¼ü×Ö¡£
1¡£¹Ø¼ü×Ö¸ßÁÁ¶ÈÏÔʾ¡ ......
List <String> sqlFileList = new ArrayList <String>();
public List <String> readSqlFiles(List <String> fileNameList) {
List <String> sqlList = new ArrayList <String>();
for (String fi ......
xml »ù´¡ÖªÊ¶
1.½éÉÜ
1£©DOM£¨JAXP Crimson½âÎöÆ÷£©
DOMÊÇÓÃÓëƽ̨ºÍÓïÑÔÎ޹صķ½Ê½±íʾXMLÎĵµµÄ¹Ù·½W3C±ê×¼¡£DOMÊÇÒÔ²ã´Î½á¹¹×éÖ¯µÄ½Úµã»òÐÅϢƬ¶ÏµÄ¼¯ºÏ¡£Õâ¸ö²ã´Î½á¹¹ÔÊÐí¿ª·¢ÈËÔ±ÔÚÊ÷ÖÐÑ°ÕÒ
Ìض¨ÐÅÏ¢¡£·ÖÎö¸Ã½á¹¹Í¨³£ÐèÒª¼ÓÔØÕû¸öÎĵµºÍ¹¹Ôì²ã´Î½á¹¹£¬È»ºó²ÅÄÜ×öÈκι¤ ......
JAVA,List,Map,Set,ÈÝÆ÷
Collection
©ÀList
©¦©ÀLinkedList
©¦©ÀArrayList
©¦©¸Vector
©¦¡¡©¸Stack
©¸Set
Map
©ÀHashtable
©ÀHashMap
©¸WeakHashMap
Collection½Ó¿Ú
¡¡¡¡CollectionÊÇ×î»ù±¾µÄ¼¯ºÏ½Ó¿Ú£¬Ò»¸öCollection´ú±íÒ»×éObject£¬¼´CollectionµÄÔªËØ£¨Elements£©¡£Ò»Ð© CollectionÔÊÐíÏàͬµÄÔªËضø ......
package com.hefeng.test;
import java.text.DateFormat;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util ......