Skip to content

Implement inputstream codec #316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

dongKos
Copy link

@dongKos dongKos commented May 17, 2025

@jchrys #314
Motivation:
Implement ByteArrayInputStreamCodec to support InputStream

Modification:
Add ByteArrayInputStreamCodec, Add Tests

Result:
Can support InpuStream for Parameter Binding

@dongKos dongKos force-pushed the feature-inputstream-codec branch from 1602538 to ff1c9da Compare May 17, 2025 08:31
@dongKos dongKos marked this pull request as draft May 17, 2025 08:33
@dongKos dongKos force-pushed the feature-inputstream-codec branch from ff1c9da to f5fe451 Compare May 17, 2025 08:44
@dongKos dongKos marked this pull request as ready for review May 17, 2025 08:44
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jchrys jchrys force-pushed the feature-inputstream-codec branch from f5fe451 to 7c3913b Compare May 18, 2025 13:05
@@ -0,0 +1,153 @@
/*
* Copyright 2023 asyncer.io projects
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2025


@Override
protected boolean doCanDecode(MySqlReadableMetadata metadata) {
return metadata.getJavaType() == InputStream.class;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that it can be decoded when metadata.isBinary()


@Override
public boolean canEncode(Object value) {
return value instanceof InputStream;
Copy link
Collaborator

@jchrys jchrys May 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ByteArrayInputStream?

@@ -0,0 +1,68 @@
/*
* Copyright 2023 asyncer.io projects
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants