{
if (_resource.length() <= 0 || _maxBuffer < _resource.length())
return null;
ByteArrayBuffer buffer = new ByteArrayBuffer((int)_resource.length());
inputStream = _resource.getInputStream();
buffer.readFrom(inputStream,(int)_resource.length());
return buffer;
}
catch (IOException e)
{
throw new RuntimeException(e);