microsoftgraph / microsoftgraph/msgraph-sdk-java

When downoading from sharepoint with buffer size always getting maximum 8K buffer and not as we asked

オープン
#2,269 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs: Attention :wave: type:question
主要言語
Java
スター
444
フォーク
154
平均マージ
18時間 28分
マージ済み PR(30日)
4

説明

Describe the bug

When downloading file from sharepoint using graph api and set the buffer size to be downloaded only 8K ( maximum) is fetched ) instread of the given buffer size.
InputStream inputStream = graphServiceClient.drives().byDriveId(driveId).items().byDriveItemId(getDriveItemIdFromRootPath(filePath)).content().get();
byte[] buf = new byte[cloudPartSizeWhenDownloadingToLocal];
int bytesRead;
while ((bytesRead = srcInputStream.read(buf)) != -1) {
byresRead is always maximum 8K and not per demand
}

Expected behavior

The bytess returned from this method should aline with the request.

How to reproduce

see above

SDK Version

6.25.1

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output
Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

graphServiceClient.drives().byDriveId(...).content().get() 呼び出しから調査を開始し、返された Java InputStream が SharePoint のダウンロードに対する read(byte[]) をどのように処理するかを確認します。観測された 8K の読み取りを Java InputStream の契約および SDK のストリーム実装と比較します。要求されたバッファリング動作が修正されるか、回帰テストで明確にカバーされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
api
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。