Interface OStream

    • Method Detail

      • put

        void put​(byte c)
        For `put(byte c)` we will generate a native method:
        
         public class OStreamImpl{
             public void put(byte c) { nativePut(getAddress(), c); }
             native void nativePut(long address, byte c);
         }
         
        In the generated JNI cxx file:
        
         void Java_xxx_nativePut(JNIEnv*, jclass, jlong address, jbytec)
         {
              std::ostream* obj = reinterpret_cast<std::ostream*>(address);
              obj->put(c);
         }
         
        Parameters:
        c - byte