# Class SamStreams

java.lang.Object
htsjdk.samtools.SamStreams

public class SamStreams extends Object
Utilities related to processing of `InputStream`s encoding SAM data

## Constructor Summary

Constructors
Constructor
Description
`SamStreams()`

## Method Summary

Modifier and Type
Method
Description
`static boolean`
`isBAMFile(InputStream stream)`
`static boolean`
`isCRAMFile(InputStream stream)`
`static boolean`
`isGzippedSAMFile(InputStream stream)`
Deprecated.
use `IOUtil.isGZIPInputStream(InputStream)` instead
`static boolean`
`sourceLikeBam(SeekableStream strm)`
`static boolean`
`sourceLikeCram(SeekableStream strm)`

### Methods inherited from class Object

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

## Constructor Details

### SamStreams

public SamStreams()

## Method Details

### isCRAMFile

public static boolean isCRAMFile(InputStream stream) throws IOException

Throws:
  `IOException`

### isBAMFile

public static boolean isBAMFile(InputStream stream) throws IOException

Parameters:
  `stream` - stream.markSupported() must be true
Returns:
  true if this looks like a BAM file.
Throws:
  `IOException`

### isGzippedSAMFile

@Deprecated public static boolean isGzippedSAMFile(InputStream stream)
Deprecated.
use `IOUtil.isGZIPInputStream(InputStream)` instead
Checks whether the file is a gzipped sam file. Returns true if it is and false otherwise.

### sourceLikeBam

public static boolean sourceLikeBam(SeekableStream strm)

### sourceLikeCram

public static boolean sourceLikeCram(SeekableStream strm)