Skip to content

Commit

Permalink
Different test
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvind-wedoe committed Jul 19, 2024
1 parent 4e7d65b commit e0cf257
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/main/kotlin/no/nav/klage/service/VedleggService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,19 @@ class VedleggService(
if (!item.isFormField) {
filename = item.name
try {
// timeStart = System.currentTimeMillis()
// inputStream.use { input ->
// filePath.outputStream().use { output ->
// input.copyTo(output, 32 * 1024)
// }
// }
// logger.debug("Copied file to temp file in {} ms", System.currentTimeMillis() - timeStart)

timeStart = System.currentTimeMillis()
inputStream.use { input ->
output = input.readBytes()
filePath.outputStream().use { output ->
input.copyTo(output, 32 * 1024)
}
}
logger.debug("Copied file to byte array in {} ms", System.currentTimeMillis() - timeStart)
logger.debug("Copied file to temp file in {} ms", System.currentTimeMillis() - timeStart)

// timeStart = System.currentTimeMillis()
// inputStream.use { input ->
// output = input.readBytes()
// }
// logger.debug("Copied file to byte array in {} ms", System.currentTimeMillis() - timeStart)
} catch (e: Exception) {
throw RuntimeException("Failed to save file", e)
} finally {
Expand Down

0 comments on commit e0cf257

Please sign in to comment.