|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjava.net.URLStreamHandler
public abstract class URLStreamHandler
Ãß»ó Ŭ·¡½º URLStreamHandler
´Â
¸ðµç ½ºÆ®¸² ÇÁ·ÎÅäÄÝ Çڵ鷯¿¡ °øÅëÀÇ ½´ÆÛ Ŭ·¡½ºÀÔ´Ï´Ù. ½ºÆ®¸² ÇÁ·ÎÅäÄÝ Çڵ鷯´Â ÇÁ·ÎÅäÄÝÀÇ Á¾·ù (http
, ftp
, gopher
µî) ¸¶´Ù Á¢¼ÓÀ» È®¸³ÇÕ´Ï´Ù.
¾îÇø®ÄÉÀ̼ǿ¡¼´Â URLStreamHandler
¼ºê Ŭ·¡½ºÀÇ ÀνºÅϽº¸¦ Á÷Á¢ ÀÛ¼ºÇÏ´Â °ÍÀº °ÅÀÇ ¾ø½À´Ï´Ù. URL
±¸ÃàÁß¿¡ óÀ½À¸·Î ÇÁ·ÎÅäÄݸíÀÌ ¹ß°ßµÇ¾úÀ» ¶§¿¡
ÀûÀýÇÑ ½ºÆ®¸² ÇÁ·ÎÅäÄÝ Çڵ鷯°¡ ÀÚµ¿ÀûÀ¸·Î ·Îµå µË´Ï´Ù.
URL.URL(java.lang.String, java.lang.String, int, java.lang.String)
»ý¼ºÀÚ °³¿ä | |
---|---|
URLStreamHandler ()
|
¸Þ¼µå °³¿ä | |
---|---|
protected boolean |
equals (URL u1,
URL u2)
µðÆúÆ®ÀÇ µî°¡ °è»êÀ» Á¦°øÇÕ´Ï´Ù. |
protected int |
getDefaultPort ()
ÀÌ Çڵ鷯°¡ ±¸¹® ºÐ¼® ÇÏ´Â URL µðÆúÆ®ÀÇ Æ÷Æ®¸¦ ¸®ÅÏÇÕ´Ï´Ù. |
protected InetAddress |
getHostAddress (URL u)
È£½ºÆ®ÀÇ IP ÁÖ¼Ò¸¦ ÃëµæÇÕ´Ï´Ù. |
protected int |
hashCode (URL u)
µðÆúÆ®ÀÇ ÇØ½Ã °è»êÀ» Á¦°øÇÕ´Ï´Ù. |
protected boolean |
hostsEqual (URL u1,
URL u2)
2°³ÀÇ URL È£½ºÆ® ÄÄÆÛ³ÍÆ®¸¦ ºñ±³ÇÕ´Ï´Ù. |
protected abstract URLConnection |
openConnection (URL u)
URL Àμö·Î ÂüÁ¶ÇÏ´Â °´Ã¼¿¡ÀÇ Á¢¼ÓÀ» È®¸³ÇÕ´Ï´Ù. |
protected URLConnection |
openConnection (URL u,
Proxy p)
Á¢¼ÓÀÌ ÁöÁ¤µÈ ÇÁ·Ï½Ã¸¦ °³ÀÔ½ÃÄÑ ÇàÇØÁö´Â °æ¿ì¸¦ Á¦¿ÜÇØ, openConnection(URL)¿Í °°½À´Ï´Ù. |
protected void |
parseURL (URL u,
String spec,
int start,
int limit)
URL
ij¸¯ÅÍ ¶óÀΠǥÇöÀ» ±¸¹® ºÐ¼® ÇØ, URL °´Ã¼·Î º¯È¯ÇÕ´Ï´Ù. |
protected boolean |
sameFile (URL u1,
URL u2)
2°³ÀÇ URL¸¦ ºñ±³ÇØ, °°Àº ÆÄÀÏÀ» ÂüÁ¶ÇÒÁö ¾î¶³Áö, Áï, °°Àº ÇÁ·ÎÅäÄÝ, È£½ºÆ®, Æ÷Æ® ¹× ÆÐ½º¸¦ °¡Áö°í ÀÖÀ»Áö ¾î¶³Áö¸¦ Á¶»çÇÕ´Ï´Ù. |
protected void |
setURL (URL u,
String protocol,
String host,
int port,
String file,
String ref)
ÃßõÇÏÁö ¾Ê½À´Ï´Ù. setURL(URL, String, int, String, String, String, String)¸¦ »ç¿ëÇØ ÁÖ¼¼¿ä. |
protected void |
setURL (URL u,
String protocol,
String host,
int port,
String authority,
String userInfo,
String path,
String query,
String ref)
URL Àμö Çʵ尪À», ÁöÁ¤µÈ °ªÀ¸·Î ¼³Á¤ÇÕ´Ï´Ù. |
protected String |
toExternalForm (URL u)
ƯÁ¤ÀÇ ÇÁ·ÎÅäÄÝÀÇ URL ¸¦ String ·Î
º¯È¯ÇÕ´Ï´Ù. |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
»ý¼ºÀÚ »ó¼¼ |
---|
public URLStreamHandler()
¸Þ¼µåÀÇ »ó¼¼ |
---|
protected abstract URLConnection openConnection(URL u) throws IOException
URL
Àμö·Î ÂüÁ¶ÇÏ´Â °´Ã¼¿¡ÀÇ Á¢¼ÓÀ» È®¸³ÇÕ´Ï´Ù. ¼ºê Ŭ·¡½º¿¡¼´Â ÀÌ ¸Þ¼µå¸¦ ¿À¹ö¶óÀ̵å(override)ÀÇÇØ ÁÖ¼¼¿ä.
HTTP ³ª JAR µîÀÇ, Çڵ鷯ÀÇ ÇÁ·ÎÅäÄÝ¿¡ ´ëÇØ¼´Â java.lang, java.io, java.util, ¶Ç´Â java.net ÆÐŰÁö, ȤÀº ±× ¼ºê ÆÐŰÁö¿¡ ¼ÓÇÏ´Â ÀÏ¹Ý ¶Ç´Â Ư¼öÇÑ URLConnection ¼ºê Ŭ·¡½º°¡ ÀÖ½À´Ï´Ù. ¸®ÅÏµÈ Á¢¼ÓÀº ±× ¼ºê Ŭ·¡½ºÀÇ °ÍÀÌ µË´Ï´Ù. ¿¹¸¦ µé¾î HTTP ÇÁ·ÎÅäÄÝ¿¡ ´ëÇØ¼´Â HttpURLConnection°¡ µ¹·ÁÁÖ°íÁ® JAR¿¡ ´ëÇØ¼´Â JarURLConnection°¡ ¸®Åϵ˴ϴ٠.
u
- Á¢¼ÓóÀÇ URL
URL
¿¡
ÀÇ URLConnection
°´Ã¼
IOException
- Á¢¼ÓÀÇ È®¸³Áß¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìprotected URLConnection openConnection(URL u, Proxy p) throws IOException
u
- Á¢¼ÓóÀÇ URLp
- Á¢¼Ó¿¡ »ç¿ëÇÏ´Â ÇÁ·Ï½Ã. Á÷Á¢ Á¢¼ÓÀÌ ¹Ù¶÷Á÷ÇÑ °æ¿ì´Â Proxy.NO_PROXY¸¦ ÁöÁ¤ÇÒ Çʿ䰡 ÀÖ´Ù
URL
¿¡
ÀÇ URLConnection
°´Ã¼
IOException
- Á¢¼ÓÀÇ È®¸³Áß¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
IllegalArgumentException
- u ¶Ç´Â p°¡ nullÀÎ °æ¿ì, ¶Ç´Â p°¡ ºÎÁ¤ÇÑ ÇüŸ¦ °¡Áö´Â °æ¿ì
UnsupportedOperationException
- ÇÁ·ÎÅäÄÝÀ» ±¸ÇöÇÏ´Â ¼ºê Ŭ·¡½º°¡ ÀÌ ¸Þ¼µå¸¦ Áö¿ø
Çϰí ÀÖÁö ¾Ê´Â °æ¿ìprotected void parseURL(URL u, String spec, int start, int limit)
URL
ij¸¯ÅÍ ¶óÀΠǥÇöÀ» ±¸¹® ºÐ¼® ÇØ, URL
°´Ã¼·Î º¯È¯ÇÕ´Ï´Ù.
»ó¼ÓµÇ´Â ÆÐ½º°¡ ÀÖ´Â °æ¿ì´Â URL
Àμö¿¡ À̹Ì
Ä«Çǵǰí ÀÖ½À´Ï´Ù.
URLStreamHandler
parseURL
´Â ij¸¯ÅÍ ¶óÀΠǥÇöÀ» http
·Î
¼ ±¸¹® ºÐ¼® ÇÕ´Ï´Ù. ´ëºÎºÐÀÇ URL ÇÁ·ÎÅäÄÝ ÆÐ¹Ð¸®´Â ±¸¹® ºÐ¼® 󸮰¡ ´à¾Ò½À´Ï´Ù. ±¸¹®ÀÌ ´Ù¸¥ ÇÁ·ÎÅäÄÝÀÇ ½ºÆ®¸² ÇÁ·ÎÅäÄÝ Çڵ鷯¿¡¼´Â ÀÌ ·çƾÀ» ¿À¹ö¶óÀ̵å(override) ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù.
u
- »ç¾ç ±¸¹® ºÐ¼®ÀÇ °á°ú¸¦ ¹Þ´Â URL
spec
- ±¸¹® ºÐ¼® ÇÒ Çʿ䰡 ÀÖ´Â URL¸¦ ³ªÅ¸³»´Â String
start
- ±¸¹® ºÐ¼®ÀÇ °³½Ã À§Ä¡¸¦ ³ªÅ¸³»´Â ¹®ÀÚ À妽º. À̰ÍÀº ÇÁ·ÎÅäÄݸíÀÇ È®Á¤À» ³ªÅ¸³»´Â ¡¸:
¡¹(Á¸ÀçÇÏ´Â °æ¿ì)ÀÇ Á÷ÈÄ¿¡ ¿À´Âlimit
- ±¸¹® ºÐ¼®ÀÇ Á¾·á À§Ä¡¸¦ ³ªÅ¸³»´Â ¹®ÀÚÀÇ À§Ä¡. À̰ÍÀº ij¸¯ÅÍ ¶óÀÎÀÇ ¸¶Áö¸·Àΰ¡ ¡¸#
¡¹¹®ÀÚ (Á¸ÀçÇÏ´Â °æ¿ì)ÀÇ À§Ä¡ÀÌ´Ù. »þÇÁ ±âÈ£º¸´Ù ³ª¸ÓÁöÀÇ Á¤º¸´Â ¸ðµÎ ¿¨Ä¿¸¦ ³ªÅ¸³½´Ùprotected int getDefaultPort()
URL
µðÆúÆ®ÀÇ Æ÷Æ®protected boolean equals(URL u1, URL u2)
u1
- URL °´Ã¼u2
- URL °´Ã¼
protected int hashCode(URL u)
u
- URL °´Ã¼
protected boolean sameFile(URL u1, URL u2)
u1
- URL °´Ã¼u2
- URL °´Ã¼
protected InetAddress getHostAddress(URL u)
u
- URL °´Ã¼
InetAddress
protected boolean hostsEqual(URL u1, URL u2)
u1
- ºñ±³ÇÏ´Â ÃÖÃÊÀÇ È£½ºÆ®ÀÇ URLu2
- ºñ±³ÇÏ´Â Á¦ 2
È£½ºÆ®ÀÇ URL
protected String toExternalForm(URL u)
URL
¸¦ String
·Î
º¯È¯ÇÕ´Ï´Ù.
u
- URL
URL
ÀμöÀÇ Ä³¸¯ÅÍ ¶óÀΠǥÇöprotected void setURL(URL u, String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref)
URL
Àμö Çʵ尪À», ÁöÁ¤µÈ °ªÀ¸·Î ¼³Á¤ÇÕ´Ï´Ù. URL
set ¸Þ¼µå¸¦ È£ÃâÇÒ ¼ö ÀÖ´Â °ÍÀº URLStreamHandler
»ó¼Ó Ŭ·¡½º »ÓÀÔ´Ï´Ù.
u
- ¼öÁ¤ÇÏ´Â URLprotocol
- ÇÁ·ÎÅäÄݸíhost
- URL
¸®¸ðÆ® È£½ºÆ®Ä¡port
- ¸®¸ðÆ® ¸Ó½Å»óÀÇ Æ÷Æ®authority
- URL
±ÇÇÑ ºÎºÐuserInfo
- URL
»ç¿ëÀÚ
Á¤º¸ºÎºÐpath
- URL
ÆÄ½ºÄÜÆ÷³ÙÆ®query
- URL
Äõ¸®ºÎºÐref
- ÂüÁ¶
SecurityException
- URL
ÇÁ·ÎÅäÄÝ Çڵ鷯°¡ À̰Ͱú ´Ù¸¥ °æ¿ìURL.set(java.lang.String, java.lang.String, int, java.lang.String, java.lang.String)
@Deprecated protected void setURL(URL u, String protocol, String host, int port, String file, String ref)
URL
Àμö Çʵ尪À», ÁöÁ¤µÈ °ªÀ¸·Î ¼³Á¤ÇÕ´Ï´Ù. URL
set ¸Þ¼µå¸¦ È£ÃâÇÒ ¼ö ÀÖ´Â °ÍÀº URLStreamHandler
»ó¼Ó Ŭ·¡½º »ÓÀÔ´Ï´Ù.
u
- ¼öÁ¤ÇÏ´Â URLprotocol
- ÇÁ·ÎÅäÄݸí. ÀÌ °ªÀº 1.2 ÀÌÈÄ ¹«½ÃµÇ´Âhost
- URL
¸®¸ðÆ® È£½ºÆ®Ä¡port
- ¸®¸ðÆ® ¸Ó½Å»óÀÇ Æ÷Æ®file
- ÆÄÀÏref
- ÂüÁ¶
SecurityException
- URL
ÇÁ·ÎÅäÄÝ Çڵ鷯°¡ À̰Ͱú ´Ù¸¥ °æ¿ì
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.