# Class CRAMEncoderOptions

java.lang.Object
htsjdk.beta.codecs.reads.cram.CRAMEncoderOptions

public class CRAMEncoderOptions extends Object
Encoder options specific to CRAM encoders.

## Constructor Summary

Constructors
Constructor
Description
`CRAMEncoderOptions()`

## Method Summary

Modifier and Type
Method
Description
`Optional<IOPath>`
`getReferencePath()`
Get the reference path for these options.
`Optional<CRAMReferenceSource>`
`getReferenceSource()`
Get the `CRAMReferenceSource` for these options.
`CRAMEncoderOptions`
`setReferencePath(IOPath referencePath)`
Set the reference path for these options.
`CRAMEncoderOptions`
`setReferenceSource(CRAMReferenceSource referenceSource)`
Set the `CRAMReferenceSource` for these options.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CRAMEncoderOptions

public CRAMEncoderOptions()

## Method Details

### getReferenceSource

public Optional<CRAMReferenceSource> getReferenceSource()
Get the `CRAMReferenceSource` for these options.

Returns:
  the `CRAMReferenceSource` for these options, or Optional.empty() if none

### setReferenceSource

public CRAMEncoderOptions setReferenceSource(CRAMReferenceSource referenceSource)
Set the `CRAMReferenceSource` for these options. Mutually exclusive with `setReferencePath(IOPath)`, which must be set to null in order to set a `CRAMReferenceSource`.

Parameters:
  `referenceSource` - the `CRAMReferenceSource` for these options. May be null.
Returns:
  updated CRAMDecoderOptions
Throws:
  `IllegalArgumentException` - if a reference path is already set on these options

### getReferencePath

public Optional<IOPath> getReferencePath()
Get the reference path for these options.

Returns:
  the reference path for these options, or Optional.empty() if none.

### setReferencePath

public CRAMEncoderOptions setReferencePath(IOPath referencePath)
Set the reference path for these options. Mutually exclusive with `setReferenceSource(CRAMReferenceSource)`, which must be set to null in order to set a reference path.

Parameters:
  `referencePath` - The path to use. may be null.
Returns:
  updated CRAMDecoderOptions
Throws:
  `IllegalArgumentException` - if a reference source is already set on these options