Skip to content

Commit 1249fff

Browse files
committed
Add java.io.OutputStream::close
1 parent 3f9a2a7 commit 1249fff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ impl OutputStream {
2020
JavaMethodProto::new("write", "([BII)V", Self::write_bytes_offset, Default::default()),
2121
JavaMethodProto::new_abstract("write", "(I)V", Default::default()),
2222
JavaMethodProto::new("flush", "()V", Self::flush, Default::default()),
23+
JavaMethodProto::new("close", "()V", Self::close, Default::default()),
2324
],
2425
fields: vec![],
2526
}
@@ -67,4 +68,10 @@ impl OutputStream {
6768

6869
Ok(())
6970
}
71+
72+
async fn close(_jvm: &Jvm, _: &mut RuntimeContext, this: ClassInstanceRef<Self>) -> Result<()> {
73+
tracing::debug!("java.io.OutputStream::close({:?})", &this);
74+
75+
Ok(())
76+
}
7077
}

0 commit comments

Comments
 (0)