// convert a String into a byte
array
private static byte[] Convert(String str)
{
int i;
byte buf[] = new byte[str.length()+1];
for (i=0; i<str.length(); i++) {
buf[i] = (byte)(str.charAt(i));
}
return buf;
}
// write access information into
log object
private static void Log(String User_HTTP_Request,
String Client_IP_Address,
String Client_Name,
int Log_File)
{
byte buf[];
String thetime = curtime();
buf = Convert(thetime);
write(Log_File, buf, buf.length);
buf = Convert(Client_Name);
write(Log_File, buf, buf.length);
buf = Convert(Client_IP_Address);
write(Log_File, buf, buf.length);
buf = Convert(User_HTTP_Request);
write(Log_File, buf, buf.length);
}
}