|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Reader
php.java.script.URLReader
public class URLReader
This class can be used to connect to a HTTP server to allocate and to invoke php scripts. Example:
PhpScriptEngine e = new PhpScriptEngine();
e.eval(new URLReader(new URL("http://localhost:80/foo.php"));
System.out.println(((Invocable)e).invoke("java_get_server_name", new Object[]{}));
e.release();
| Constructor Summary | |
|---|---|
URLReader(java.net.URL url)
Create a special reader which can be used to read data from a URL. |
|
| Method Summary | |
|---|---|
void |
close()
|
java.net.URL |
getURL()
Returns the URL to which this reader connects. |
int |
read(char[] cbuf,
int off,
int len)
|
void |
read(java.util.Map env,
java.io.OutputStream out)
Read from the URL and write the data to out. |
java.lang.String |
toString()
|
| Methods inherited from class java.io.Reader |
|---|
mark, markSupported, read, read, read, ready, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public URLReader(java.net.URL url)
throws java.net.UnknownHostException,
java.io.IOException
url -
java.io.IOException
java.net.UnknownHostException| Method Detail |
|---|
public java.net.URL getURL()
public int read(char[] cbuf,
int off,
int len)
throws java.io.IOException
read in class java.io.ReaderNotImplementedException
java.io.IOExceptionread(Map, OutputStream)
public void read(java.util.Map env,
java.io.OutputStream out)
throws java.io.IOException
env - The environment, must contain values for X_JAVABRIDGE_CONTEXT. It may contain X_JAVABRIDGE_OVERRIDE_HOSTS.out - The OutputStream.
java.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.ReaderNotImplementedException
java.io.IOExceptionread(Map, OutputStream)public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||