You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2019/11/20 15:37:28 UTC
[GitHub] [incubator-daffodil] stevedlawrence commented on a change in pull
request #291: Switch to file output stream for large data
stevedlawrence commented on a change in pull request #291: Switch to file output stream for large data
URL: https://github.com/apache/incubator-daffodil/pull/291#discussion_r348528866
##########
File path: daffodil-io/src/main/scala/org/apache/daffodil/io/DirectOrBufferedDataOutputStream.scala
##########
@@ -33,30 +33,79 @@ import org.apache.daffodil.util.Maybe
import org.apache.daffodil.util.Maybe._
import org.apache.daffodil.util.MaybeULong
import org.apache.daffodil.util.Misc
+import java.io.File
/**
* This simple extension just gives us a public method for access to the underlying byte array.
* That way we don't have to make a copy just to access the bytes.
*/
-private[io] class ByteArrayOutputStreamWithGetBuf() extends java.io.ByteArrayOutputStream {
+private[io] class ByteArrayOrFileOutputStreamWithGetBuf(
+ chunkSizeInBytes: Long = 4096,
+ maxBufferSizeInBytes: Long = 2000 * (1 << 20))
Review comment:
Thoughts on removing these defaults? These values should also be provided by tunables, which have default values. It might be a little confusing to have defaults in two different places.
Also, it doesn't look like chunkSizeInBytes is used in this clas. Can it be removed?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services