MCPcopy Index your code
hub / github.com/davidgiven/luje / open

Method open

lib/org/apache/harmony/luni/platform/OSFileSystem.java:229–245  ·  view source on GitHub ↗
(byte[] fileName, int mode)

Source from the content-addressed store, hash-verified

227 private native int truncateImpl(long fileDescriptor, long size);
228
229 public long open(byte[] fileName, int mode) throws FileNotFoundException {
230 if (fileName == null) {
231 throw new NullPointerException();
232 }
233 long handler = openImpl(fileName, mode);
234 if (handler < 0) {
235 try {
236 throw new FileNotFoundException(new String(fileName, "UTF-8"));
237 } catch (java.io.UnsupportedEncodingException e) {
238 // UTF-8 should always be supported, so throw an assertion
239 FileNotFoundException fnfe = new FileNotFoundException(new String(fileName));
240 e.initCause(fnfe);
241 throw new AssertionError(e);
242 }
243 }
244 return handler;
245 }
246
247 private native long openImpl(byte[] fileName, int mode);
248

Callers

nothing calls this directly

Calls 2

openImplMethod · 0.95
initCauseMethod · 0.80

Tested by

no test coverage detected