MCPcopy Create free account
hub / github.com/ReadyTalk/avian / Java_java_io_FileInputStream_read__I_3BII

Function Java_java_io_FileInputStream_read__I_3BII

classpath/java-io.cpp:757–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

755}
756
757extern "C" JNIEXPORT jint JNICALL
758 Java_java_io_FileInputStream_read__I_3BII(JNIEnv* e,
759 jclass,
760 jint fd,
761 jbyteArray b,
762 jint offset,
763 jint length)
764{
765 jbyte* data = static_cast<jbyte*>(malloc(length));
766 if (data == 0) {
767 throwNew(e, "java/lang/OutOfMemoryError", 0);
768 return 0;
769 }
770
771 int r = doRead(e, fd, data, length);
772
773 e->SetByteArrayRegion(b, offset, length, data);
774
775 free(data);
776
777 return r;
778}
779
780extern "C" JNIEXPORT void JNICALL
781 Java_java_io_FileInputStream_close(JNIEnv* e, jclass, jint fd)

Callers

nothing calls this directly

Calls 3

freeFunction · 0.85
throwNewFunction · 0.70
doReadFunction · 0.70

Tested by

no test coverage detected