< prev index next >
src/java.base/share/classes/sun/misc/Resource.java
Print this page
*** 152,162 ****
return b;
}
/**
* Returns the Resource data as a ByteBuffer, but only if the input stream
! * was implemented on top of a ByteBuffer. Return <tt>null</tt> otherwise.
*/
public ByteBuffer getByteBuffer() throws IOException {
InputStream in = cachedInputStream();
if (in instanceof ByteBuffered) {
return ((ByteBuffered)in).getByteBuffer();
--- 152,163 ----
return b;
}
/**
* Returns the Resource data as a ByteBuffer, but only if the input stream
! * was implemented on top of a ByteBuffer. Return {@code null} otherwise.
! * @return Resource data or null.
*/
public ByteBuffer getByteBuffer() throws IOException {
InputStream in = cachedInputStream();
if (in instanceof ByteBuffered) {
return ((ByteBuffered)in).getByteBuffer();
< prev index next >