Discussion:
Reading contents of a file int a java class
Michael Lee
2012-09-17 11:53:28 UTC
Permalink
I tried with the following but it doesn't work for me. I got a "Failed to find entry point for component" error:
<br /><br />
<code>
<br />
import java&#46;io&#46;InputStream;
<br /><br />
import org&#46;apache&#46;log4j&#46;Logger;
<br /><br />
public class GetFileSize
<br />
{
<br />
private Logger log = Logger&#46;getLogger(GetFileSize&#46;class);
<br /><br />
public static void main(String[] args) {
<br /><br />
}
<br /><br />
void processStream(InputStream is) throws Exception {
<br />
try {
<br />
log&#46;info(&quot;Start of processFile&quot;);
<br />
log&#46;info(&quot;End of processFile&quot;);
<br />
}
<br />
finally {
<br />
if (is != null) {
<br />
is&#46;close();
<br />
}
<br />
}
<br />
}
<br />
}
<br />
</code>
<br /><br />
What did I do wrong?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Loading...