# Class SAMFileSource

java.lang.Object
htsjdk.samtools.SAMFileSource

public class SAMFileSource extends Object
Represents the origin of a SAM record.

## Constructor Summary

Constructors
Constructor
Description
`SAMFileSource(SamReader reader, SAMFileSpan filePointer)`
Create a new SAMFileSource with the given reader and file pointer.

## Method Summary

Modifier and Type
Method
Description
`SAMFileSpan`
`getFilePointer()`
A pointer to the region on disk from which the read originated.
`SamReader`
`getReader()`
Retrieves the reader from which this read was initially retrieved.

### Methods inherited from class Object

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

## Constructor Details

### SAMFileSource

public SAMFileSource(SamReader reader, SAMFileSpan filePointer)
Create a new SAMFileSource with the given reader and file pointer.

Parameters:
  `reader` - reader.
  `filePointer` - File pointer.

## Method Details

### getReader

public SamReader getReader()
Retrieves the reader from which this read was initially retrieved.

Returns:
  The reader.

### getFilePointer

public SAMFileSpan getFilePointer()
A pointer to the region on disk from which the read originated.

Returns:
  A pointer within the file.