| 148 | } |
| 149 | |
| 150 | LVStreamRef CRJNIEnv::jbyteArrayToStream( jbyteArray array ) |
| 151 | { |
| 152 | if ( !array ) |
| 153 | return LVStreamRef(); |
| 154 | int len = env->GetArrayLength(array); |
| 155 | if ( !len ) |
| 156 | return LVStreamRef(); |
| 157 | lUInt8 * data = (lUInt8 *)env->GetByteArrayElements(array, 0); |
| 158 | LVStreamRef res = LVCreateMemoryStream(data, len, true, LVOM_READ); |
| 159 | env->ReleaseByteArrayElements(array, (jbyte*)data, 0); |
| 160 | return res; |
| 161 | } |
| 162 | |
| 163 | jbyteArray CRJNIEnv::streamToJByteArray( LVStreamRef stream ) |
| 164 | { |
no test coverage detected