324325326327328329330331332333334
LOG.warn("invalid resource: "+String.valueOf(resource)+" "+len); return null; } Buffer buffer = new DirectNIOBuffer(len); InputStream is = resource.getInputStream(); buffer.readFrom(is,len); is.close(); return buffer; } catch(IOException e) {