com.sun.pdfview.font.ttf

## Class CMapFormat4

- java.lang.Object
- - com.sun.pdfview.font.ttf.CMap
  - - com.sun.pdfview.font.ttf.CMapFormat4

    public class CMapFormat4
    extends CMap

### Field Summary

Fields
`java.util.SortedMap<com.sun.pdfview.font.ttf.CMapFormat4.Segment,java.lang.Object>` `segments` The segments and associated data can be a char[] or an Integer

### Constructor Summary

Constructors
`protected` `CMapFormat4(short language)` Creates a new instance of CMapFormat0

### Method Summary

Methods
`void` `addSegment(short startCode, short endCode, char[] map)` Add a segment with a map
`void` `addSegment(short startCode, short endCode, short idDelta)` Add a segment with an idDelta
`java.nio.ByteBuffer` `getData()` Get the data in the map as a byte buffer
`short` `getEntrySelector()` Get the entry selector
`short` `getLength()` Get the length of this table
`short` `getRangeShift()` Get the rangeShift()
`short` `getSearchRange()` Get the search range
`short` `getSegmentCount()` Get the segment count
`byte` `map(byte src)` Cannot map from a byte
`char` `map(char src)` Map from char
`void` `removeSegment(short startCode, short endCode)` Remove a segment
`char` `reverseMap(short glyphID)` Get the src code which maps to the given glyphID
`void` `setData(int length, java.nio.ByteBuffer data)` Get the data in this map as a ByteBuffer
`java.lang.String` `toString()` Get a pretty string

### Methods inherited from class com.sun.pdfview.font.ttf.CMap

`createMap, getFormat, getLanguage, getMap`

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

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

### Field Detail

#### segments

    public java.util.SortedMap<com.sun.pdfview.font.ttf.CMapFormat4.Segment,java.lang.Object> segments

The segments and associated data can be a char[] or an Integer

### Constructor Detail

#### CMapFormat4

    protected CMapFormat4(short language)

Creates a new instance of CMapFormat0

### Method Detail

#### addSegment

    public void addSegment(short startCode,
                  short endCode,
                  char[] map)

Add a segment with a map

#### addSegment

    public void addSegment(short startCode,
                  short endCode,
                  short idDelta)

Add a segment with an idDelta

#### removeSegment

    public void removeSegment(short startCode,
                     short endCode)

Remove a segment

#### getLength

    public short getLength()

Get the length of this table

Specified by:
  `getLength` in class `CMap`

#### map

    public byte map(byte src)

Cannot map from a byte

Specified by:
  `map` in class `CMap`

#### map

    public char map(char src)

Map from char

Specified by:
  `map` in class `CMap`

#### reverseMap

    public char reverseMap(short glyphID)

Get the src code which maps to the given glyphID

Specified by:
  `reverseMap` in class `CMap`

#### setData

    public void setData(int length,
               java.nio.ByteBuffer data)

Get the data in this map as a ByteBuffer

Specified by:
  `setData` in class `CMap`

#### getData

    public java.nio.ByteBuffer getData()

Get the data in the map as a byte buffer

Specified by:
  `getData` in class `CMap`

#### getSegmentCount

    public short getSegmentCount()

Get the segment count

#### getSearchRange

    public short getSearchRange()

Get the search range

#### getEntrySelector

    public short getEntrySelector()

Get the entry selector

#### getRangeShift

    public short getRangeShift()

Get the rangeShift()

#### toString

    public java.lang.String toString()

Get a pretty string

Overrides:
  `toString` in class `CMap`