Skip to content

Commit bc62a15

Browse files
committed
Add FileOutputStream::close
1 parent 8a1bef7 commit bc62a15

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

java_runtime/src/classes/java/io/file_output_stream.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ impl FileOutputStream {
2929
),
3030
JavaMethodProto::new("write", "([BII)V", Self::write_bytes_offset, Default::default()),
3131
JavaMethodProto::new("write", "(I)V", Self::write, Default::default()),
32+
JavaMethodProto::new("close", "()V", Self::close, Default::default()),
3233
],
3334
fields: vec![JavaFieldProto::new("fd", "Ljava/io/FileDescriptor;", Default::default())],
3435
}
@@ -102,4 +103,10 @@ impl FileOutputStream {
102103

103104
Ok(())
104105
}
106+
107+
async fn close(_jvm: &Jvm, _: &mut RuntimeContext, this: ClassInstanceRef<Self>) -> Result<()> {
108+
tracing::debug!("stub java.io.FileInputStream::close({:?})", &this);
109+
110+
Ok(())
111+
}
105112
}

0 commit comments

Comments
 (0)