Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A AndroidAsync
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 333
    • Issues 333
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Koushik Dutta
  • AndroidAsync
  • Merge requests
  • !130

sendStream() in AsyncHttpServerResponse has control of stream data

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/erkasraim/master into master 11 years ago
  • Overview 4
  • Commits 2
  • Pipelines 0
  • Changes 5

Created by: erkasraim

In my case, I want to use sendSream()

  1. Encrypt File read
  2. Decrypt byte
  3. Send byte

My Issue is second phase.

Solve,

  1. Add DataInterceptCallback class
  2. Add sendStream(InputStream inputStream, long totalLength, DataInterceptCallback dataInterceptCallback) method in AsyncHttpServerResponse class
  3. Add pump(final InputStream is, final long max, final DataSink ds, final CompletedCallback callback, final DataInterceptCallback dataInterceptCallback) method in Util class
Approval is optional

Closed by (Jul 27, 2025 10:24pm UTC)

Merge details

  • The changes were not merged into master.

Activity


  • Koushik Dutta
    Koushik Dutta @koush · 11 years ago
    Owner

    You should wrap the DataSink (similar to how you would wrap an OutputStream). Or wrap the Inputstream.

    Both ways let you rewrite the data on either the read or the write. Doing it in this library is not a good way to go about it.

  • Koushik Dutta closed 11 years ago

    closed

  • Administrator
    Administrator @root · 11 years ago
    Author Contributor

    Created by: erkasraim

    I'm using AsyncHttpServer class. Do not wrap DataSink because create AsyncHttpServerResponseImpl instance in AsyncHttpServer class

  • Koushik Dutta
    Koushik Dutta @koush · 11 years ago
    Owner

    Then wrap the inputstream.

  • Administrator
    Administrator @root · 11 years ago
    Author Contributor

    Created by: erkasraim

    OK, understand your advice. Thanks

Please register or sign in to reply
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
2
2 participants
Koushik Dutta
Administrator
Reference: koush/AndroidAsync!130
Source branch: github/fork/erkasraim/master

Menu

Explore Projects Groups Snippets