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

Function Java_java_io_FileOutputStream_write__I_3BII

classpath/java-io.cpp:812–833  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

810}
811
812extern "C" JNIEXPORT void JNICALL
813 Java_java_io_FileOutputStream_write__I_3BII(JNIEnv* e,
814 jclass,
815 jint fd,
816 jbyteArray b,
817 jint offset,
818 jint length)
819{
820 jbyte* data = static_cast<jbyte*>(malloc(length));
821
822 if (data == 0) {
823 throwNew(e, "java/lang/OutOfMemoryError", 0);
824 return;
825 }
826
827 e->GetByteArrayRegion(b, offset, length, data);
828 if (not e->ExceptionCheck()) {
829 doWrite(e, fd, data, length);
830 }
831
832 free(data);
833}
834
835extern "C" JNIEXPORT void JNICALL
836 Java_java_io_FileOutputStream_close(JNIEnv* e, jclass, jint fd)

Callers

nothing calls this directly

Calls 3

freeFunction · 0.85
throwNewFunction · 0.70
doWriteFunction · 0.70

Tested by

no test coverage detected