git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] mbeckerle commented on a change in pull request #61: Preliminary Review - Base64 layering runs first parsing unit test.


mbeckerle commented on a change in pull request #61: Preliminary Review - Base64 layering runs first parsing unit test.
URL: https://github.com/apache/incubator-daffodil/pull/61#discussion_r180909573
 
 

 ##########
 File path: daffodil-runtime1/src/main/scala/org/apache/daffodil/layers/Base64Transformer.scala
 ##########
 @@ -0,0 +1,43 @@
+package org.apache.daffodil.layers
+
+import org.apache.daffodil.schema.annotation.props.gen.LayerLengthKind
+import org.apache.daffodil.schema.annotation.props.gen.LayerLengthUnits
+import org.apache.daffodil.util.Maybe
+import org.apache.daffodil.processors.TermRuntimeData
+import org.apache.daffodil.processors.LayerLengthInBytesEv
+import org.apache.daffodil.processors.LayerTerminatorEv
+import org.apache.daffodil.processors.LayerCharsetEv
+
+class Base64MIMETransformer(layerCharsetEv: LayerCharsetEv, layerTerminatorEv: LayerTerminatorEv)
+  extends LayerTransformer() {
+
+  override def wrapLayerDecoder(jis: java.io.InputStream) = {
+    val b64 = java.util.Base64.getMimeDecoder().wrap(jis)
+    b64
+  }
+
+}
+
+object Base64MIMETransformerFactory
 
 Review comment:
   Add scaladoc: newInstance method digests the various layering related arguments to decide how to configure and which layer transformer to create, then constructs it appropriately.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@xxxxxxxxxxxxxxxx


With regards,
Apache Git Services