137 }
138 }
139 pos += cc;
140 }
141 } finally {
142 try {
143 in.close();
144 } catch (InterruptedIOException iioe) {
145 isInterrupted = true;
146 } catch (IOException ignore) {}
147
148 if (isInterrupted) {
149 Thread.currentThread().interrupt();
150 }
151 }
152 return b;
153 }
154
155 /**
156 * Returns the Resource data as a ByteBuffer, but only if the input stream
157 * was implemented on top of a ByteBuffer. Return <tt>null</tt> otherwise.
158 */
159 public ByteBuffer getByteBuffer() throws IOException {
160 InputStream in = cachedInputStream();
161 if (in instanceof ByteBuffered) {
162 return ((ByteBuffered)in).getByteBuffer();
163 }
164 return null;
165 }
166
167 /**
168 * Returns the Manifest for the Resource, or null if none.
169 */
170 public Manifest getManifest() throws IOException {
171 return null;
172 }
173
174 /**
175 * Returns theCertificates for the Resource, or null if none.
176 */
177 public java.security.cert.Certificate[] getCertificates() {
|
137 }
138 }
139 pos += cc;
140 }
141 } finally {
142 try {
143 in.close();
144 } catch (InterruptedIOException iioe) {
145 isInterrupted = true;
146 } catch (IOException ignore) {}
147
148 if (isInterrupted) {
149 Thread.currentThread().interrupt();
150 }
151 }
152 return b;
153 }
154
155 /**
156 * Returns the Resource data as a ByteBuffer, but only if the input stream
157 * was implemented on top of a ByteBuffer. Return {@code null} otherwise.
158 * @return Resource data or null.
159 */
160 public ByteBuffer getByteBuffer() throws IOException {
161 InputStream in = cachedInputStream();
162 if (in instanceof ByteBuffered) {
163 return ((ByteBuffered)in).getByteBuffer();
164 }
165 return null;
166 }
167
168 /**
169 * Returns the Manifest for the Resource, or null if none.
170 */
171 public Manifest getManifest() throws IOException {
172 return null;
173 }
174
175 /**
176 * Returns theCertificates for the Resource, or null if none.
177 */
178 public java.security.cert.Certificate[] getCertificates() {
|