Package com.google.debugging.sourcemap

# Class SourceMapGeneratorV2.LineMapEncoder

java.lang.Object
com.google.debugging.sourcemap.SourceMapGeneratorV2.LineMapEncoder

Enclosing class:
  `SourceMapGeneratorV2`

public static class SourceMapGeneratorV2.LineMapEncoder extends Object

## Constructor Summary

Constructors
Constructor
Description
`LineMapEncoder()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`encodeEntry(Appendable out, int id, int lastId, int reps)`
The source map line map is consists of a series of entries each representing a map entry and a repetition count of that entry.
`static int`
`getRelativeMappingId(int id, int idLength, int lastId)`
`static int`
`getRelativeMappingIdLength(int rawId, int lastId)`

### Methods inherited from class java.lang.Object

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

## Constructor Details

### LineMapEncoder

public LineMapEncoder()

## Method Details

### encodeEntry

public static void encodeEntry(Appendable out, int id, int lastId, int reps) throws IOException
The source map line map is consists of a series of entries each representing a map entry and a repetition count of that entry.

Parameters:
  `out` - The entry destination.
  `id` - The id for the entry.
  `lastId` - The previous id written, used to generate a relative map id.
  `reps` - The number of times the id is repeated in the map.
Throws:
  `IOException`

### getRelativeMappingId

public static int getRelativeMappingId(int id, int idLength, int lastId)

Parameters:
  `idLength` - the length relative id, when encoded in as a base64 value. @see #getRelativeMappingIdLength
Returns:
  A value relative to the the lastId. Negative value are represented as a two-complement value.

### getRelativeMappingIdLength

public static int getRelativeMappingIdLength(int rawId, int lastId)

Returns:
  The length of the base64 number needed to include the id.