import java.util.*;
import java.beans.*;
-class reflect {
+public class reflect {
static { loadLibrary("reflect"); }
//
// Helper routines which encapsulate the native methods
//
- static void setResult(long result, Object value) {
+ public static void setResult(long result, Object value) {
if (value == null) return;
if (value instanceof java.lang.String) {
import java.util.*;
import java.beans.*;
-class reflect {
+public class reflect {
static { loadLibrary("reflect"); }
//
// Helper routines which encapsulate the native methods
//
- static void setResult(long result, Object value) {
+ public static void setResult(long result, Object value) {
if (value == null) return;
if (value instanceof java.lang.String) {
/******************************************************************/
static { reflect.loadLibrary("servlet"); }
- native void startup();
- native long define(String name);
- native void send(String requestMethod, String queryString,
+ public native void startup();
+ public native long define(String name);
+ public native void send(String requestMethod, String queryString,
String pathInfo, String pathTranslated,
String contentType, int contentLength, String authUser,
boolean display_source_mode);
- native void shutdown();
+ public native void shutdown();
/******************************************************************/
/* sapi callbacks */
/******************************************************************/
- String readPost(int bytes) {
+ public String readPost(int bytes) {
String result;
if (!request.getMethod().equals("POST")) {
result = request.getQueryString();
return result;
}
- String readCookies() {
+ public String readCookies() {
reflect.setResult(define("request"), request);
reflect.setResult(define("response"), response);
reflect.setResult(define("PHP_SELF"), request.getRequestURI());
return request.getHeader("cookie");
}
- void header(String data) {
+ public void header(String data) {
// try to send the header using the most specific servlet API
// as possible (some servlet engines will add a content type
}
- void write(String data) {
+ public void write(String data) {
try {
response.getWriter().print(data);
} catch (IOException e) {