microsoftgraph / microsoftgraph/msgraph-sdk-java
When downoading from sharepoint with buffer size always getting maximum 8K buffer and not as we asked
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 444
- Fork
- 154
- Merge medio
- 18h 28m
- PR unite (30g)
- 4
Descrizione
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_
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dalla chiamata graphServiceClient.drives().byDriveId(...).content().get() e analizza come il Java InputStream restituito gestisce read(byte[]) per i download da SharePoint. Confronta le letture da 8K osservate con il contratto di Java InputStream e l'implementazione dello stream dell'SDK; il lavoro è completato quando il comportamento di buffering richiesto è corretto oppure chiaramente coperto da un test di regressione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- api
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100