wholefile-transformer-lib/src/main/java/com/streamsets/pipeline/stage/processor/transformer/WholeFileTransformerProcessor.java
private InputStream getAvroInputStream(Record record) throws StageException {
    try {
      FileRef fileRef = record.get(FileRefUtil.FILE_REF_FIELD_PATH).getValueAsFileRef();

      // get avro reader
      final boolean includeChecksumInTheEvents = false;

      InputStream is = FileRefUtil.getReadableStream(
          getContext(),
          fileRef,
          InputStream.class,
          includeChecksumInTheEvents,
          null,
          null
      );

      return is;
    } catch (IOException ex) {
      throw new TransformerStageCheckedException(Errors.CONVERT_07, ex.toString(), ex);
    }
  }
private InputStream getAvroInputStream(Record record) throws StageException {
    try {
      FileRef fileRef = record.get(FileRefUtil.FILE_REF_FIELD_PATH).getValueAsFileRef();

      // get avro reader
      final boolean includeChecksumInTheEvents = false;

      InputStream is = FileRefUtil.getReadableStream(
          getContext(),
          fileRef,
          InputStream.class,
          includeChecksumInTheEvents,
          null,
          null
      );

      return is;
    } catch (IOException ex) {
      throw new TransformerStageCheckedException(Errors.CONVERT_07, ex.toString(), ex);
    }
  }
private InputStream getAvroInputStream ( Record record ) throws StageException { try { FileRef fileRef = record . get ( FileRefUtil . FILE_REF_FIELD_PATH ) . getValueAsFileRef ( ) ; // get avro reader final boolean includeChecksumInTheEvents = false ; InputStream is = FileRefUtil . getReadableStream ( getContext ( ) , fileRef , InputStream . class , includeChecksumInTheEvents , null , null ) ; return is ; } catch ( IOException ex ) { throw new TransformerStageCheckedException ( Errors . CONVERT_07 , ex . toString ( ) , ex ) ; } }
Return the Avro file input stream
@param record the {@link com.streamsets.pipeline.api.Record} whole file record
Return the Avro file input stream