Skip to Main Content
Hack Proofing Your Web Applications
book

Hack Proofing Your Web Applications

by Syngress
June 2001
Intermediate to advanced content levelIntermediate to advanced
512 pages
18h 49m
English
Syngress
Content preview from Hack Proofing Your Web Applications
268 Chapter 7 • Securing Your Java Code
c = defineClass(name, classData, 0, classData.length);
if (c==null)
throw new ClassNotFoundException(name);
loadedClasses.put(name, c);
if (resolve) resolveClass(c);
return c;
}
private byte [] loadClassData(String name) {
int byteTemp;
ByteArrayOutputStream out = new ByteArrayOutputStream();
final int EOF = -1;
name = name + ".class"; //creates new string object
try {
FileInputStream fi = new FileInputStream(name);
while((byteTemp = fi.read()) != EOF)
out.write(byteTemp);
} catch (IOException e) {}
return out.toByteArray();
}
}
This program will read the classes from disk (in the current direc-
tory) and load them into the VM. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Developer's Guide to Web Application Security

Developer's Guide to Web Application Security

Michael Cross
The CERT® Oracle® Secure Coding Standard for Java™

The CERT® Oracle® Secure Coding Standard for Java™

Fred Long, Dhruv Mohindra, Robert C. Seacord, Dean F. Sutherland, David Svoboda
Troubleshooting CentOS

Troubleshooting CentOS

Jonathan Hobson

Publisher Resources

ISBN: 9781928994312