Resource resource=content.getResource();
long length=resource.length();
if (_useFileMappedBuffer && resource.getFile()!=null)
{
buffer = new DirectNIOBuffer(resource.getFile());
}
else
{
InputStream is = resource.getInputStream();
try
{
Connector connector = HttpConnection.getCurrentConnection().getConnector();
buffer = ((NIOConnector)connector).getUseDirectBuffers()?
(NIOBuffer)new DirectNIOBuffer((int)length):
(NIOBuffer)new IndirectNIOBuffer((int)length);
}
catch(OutOfMemoryError e)
{