com.aelitis.net.magneturi.impl
Class MagnetURIHandlerImpl
java.lang.Object
  
com.aelitis.net.magneturi.MagnetURIHandler
      
com.aelitis.net.magneturi.impl.MagnetURIHandlerImpl
public class MagnetURIHandlerImpl
- extends MagnetURIHandler
 
- Author:
 
  - parg
 
 
 
| 
Field Summary | 
protected static String | 
NL
 
            | 
 
 
| 
Method Summary | 
 void | 
addInfo(String name,
        int info)
 
            | 
 void | 
addListener(MagnetURIHandlerListener l)
 
            | 
protected  String | 
getJS(String s)
 
            | 
protected  String | 
getJSS(String s)
 
            | 
protected  String | 
getMessageText(String resource)
 
            | 
protected  String | 
getMessageText(String resource,
               String param)
 
            | 
 int | 
getPort()
 
            | 
static MagnetURIHandler | 
getSingleton()
 
            | 
static void | 
main(String[] args)
 
            | 
protected  boolean | 
process(String get,
        BufferedReader is,
        OutputStream os)
 
            | 
 void | 
process(String get,
        InputStream is,
        OutputStream os)
 
            | 
 URL | 
registerResource(MagnetURIHandler.ResourceProvider provider)
 
            | 
 void | 
removeListener(MagnetURIHandlerListener l)
 
            | 
protected  void | 
writeNotFound(OutputStream os)
 
            | 
protected  void | 
writeReply(OutputStream os,
           String content_type,
           byte[] content)
 
            | 
protected  void | 
writeReply(OutputStream os,
           String content_type,
           String content)
 
            | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
NL
protected static final String NL
- See Also:
 - Constant Field Values
 
MagnetURIHandlerImpl
protected MagnetURIHandlerImpl()
getSingleton
public static MagnetURIHandler getSingleton()
 
process
public void process(String get,
                    InputStream is,
                    OutputStream os)
             throws IOException
- Specified by:
 process in class MagnetURIHandler
 
- Throws:
 IOException
 
process
protected boolean process(String get,
                          BufferedReader is,
                          OutputStream os)
                   throws IOException
- Throws:
 IOException
 
getMessageText
protected String getMessageText(String resource)
 
getMessageText
protected String getMessageText(String resource,
                                String param)
 
getJS
protected String getJS(String s)
 
getJSS
protected String getJSS(String s)
 
writeReply
protected void writeReply(OutputStream os,
                          String content_type,
                          String content)
                   throws IOException
- Throws:
 IOException
 
writeReply
protected void writeReply(OutputStream os,
                          String content_type,
                          byte[] content)
                   throws IOException
- Throws:
 IOException
 
writeNotFound
protected void writeNotFound(OutputStream os)
                      throws IOException
- Throws:
 IOException
 
getPort
public int getPort()
- Specified by:
 getPort in class MagnetURIHandler
 
 
addInfo
public void addInfo(String name,
                    int info)
- Specified by:
 addInfo in class MagnetURIHandler
 
 
addListener
public void addListener(MagnetURIHandlerListener l)
- Specified by:
 addListener in class MagnetURIHandler
 
 
removeListener
public void removeListener(MagnetURIHandlerListener l)
- Specified by:
 removeListener in class MagnetURIHandler
 
 
main
public static void main(String[] args)
 
registerResource
public URL registerResource(MagnetURIHandler.ResourceProvider provider)
- Specified by:
 registerResource in class MagnetURIHandler