APIdia Launch Partner
Top Description Inners Fields Constructors Methods
io.github.spannm.jackcess.impl

public Class General97IndexCodes

extends GeneralLegacyIndexCodes
Class Inheritance
Annotations
@SuppressWarnings:PMD.FieldDeclarationsShouldBeAtStartOfClass
Imports
io.github.spannm.jackcess.impl.ByteUtil.ByteStream, java.io.BufferedReader, .IOException, .InputStreamReader, .UncheckedIOException, java.nio.charset.StandardCharsets

Encoding logic for MS Access "General 97" text index entries (Access 97; LCID 1033, version −1).

Extends GeneralLegacyIndexCodes with Access-97-specific character tables and an additional mapping file for extended characters. The overall byte-format structure is shared with the legacy variant, but Access 97 uses a narrower set of extended character mappings rather than per-character extra-byte tables.

Character handlers are loaded lazily from:

See Also
ColumnImpl#GENERAL_97_SORT_ORDER, GeneralLegacyIndexCodes

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
protected static class
General97IndexCodes.NibbleStream

Extension of ByteStream which enables writing individual nibbles.

Field Summary

Modifier and TypeField and Description
private static final String
private static final byte
private static final String
private static final char
pack-priv static final General97IndexCodes
private static final char
Inherited from io.github.spannm.jackcess.impl.GeneralLegacyIndexCodes:
CRAZY_CODE_1CRAZY_CODE_2CRAZY_CODE_STARTCRAZY_CODES_PER_SUFFIX_REPEATCRAZY_CODES_SUFFIX_MIDFIXCRAZY_CODES_SUFFIX_REPEATCRAZY_CODES_SUFFIX_SEPARATORCRAZY_CODES_SUFFIX_STARTCRAZY_CODES_UNPRINT_SUFFIXEND_EXTRA_TEXTEND_TEXTFIRST_CHARFIRST_EXT_CHARGEN_LEG_INSTANCEIGNORED_CHAR_HANDLERIGNORED_SURROGATESINTERNATIONAL_EXTRA_PLACEHOLDERLAST_CHARLAST_EXT_CHARMAX_TEXT_INDEX_CHAR_LENGTHUNPRINTABLE_COUNT_MULTIPLIERUNPRINTABLE_COUNT_STARTUNPRINTABLE_MIDFIXUNPRINTABLE_OFFSET_FLAGS

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv GeneralLegacyIndexCodes.CharHandler
getCharHandler(char c)

Overrides io.github.spannm.jackcess.impl.GeneralLegacyIndexCodes.getCharHandler.

Returns the CharHandler for the given character.

pack-priv static short[]
loadMappings(String mappingsFilePath, char firstChar, char lastChar)

private static void
writeExtraCodes(int numSigChars, byte[] bytes, General97IndexCodes.NibbleStream extraCodes)

pack-priv void
writeNonNullIndexTextValue(Object value, ByteUtil.ByteStream bout, boolean isAscending)

Overrides io.github.spannm.jackcess.impl.GeneralLegacyIndexCodes.writeNonNullIndexTextValue.

Converts a 97 index value for a text column into the entry value (which is based on a variety of nifty codes).

Inherited from io.github.spannm.jackcess.impl.GeneralLegacyIndexCodes:
asUnsignedCharloadCodesloadCodestoIndexCharSequence

Field Detail

CODES_FILEback to summary
private static final String CODES_FILE

Hides io.github.spannm.jackcess.impl.GeneralLegacyIndexCodes.CODES_FILE.

EXT_CODES_BOUNDS_NIBBLEback to summary
private static final byte EXT_CODES_BOUNDS_NIBBLE
EXT_MAPPINGS_FILEback to summary
private static final String EXT_MAPPINGS_FILE
FIRST_MAP_CHARback to summary
private static final char FIRST_MAP_CHAR
GEN_97_INSTANCEback to summary
pack-priv static final General97IndexCodes GEN_97_INSTANCE
LAST_MAP_CHARback to summary
private static final char LAST_MAP_CHAR

Constructor Detail

General97IndexCodesback to summary
pack-priv General97IndexCodes()

Method Detail

getCharHandlerback to summary
pack-priv GeneralLegacyIndexCodes.CharHandler getCharHandler(char c)

Overrides io.github.spannm.jackcess.impl.GeneralLegacyIndexCodes.getCharHandler.

Returns the CharHandler for the given character.

Annotations
@Override
loadMappingsback to summary
pack-priv static short[] loadMappings(String mappingsFilePath, char firstChar, char lastChar)
writeExtraCodesback to summary
private static void writeExtraCodes(int numSigChars, byte[] bytes, General97IndexCodes.NibbleStream extraCodes)
writeNonNullIndexTextValueback to summary
pack-priv void writeNonNullIndexTextValue(Object value, ByteUtil.ByteStream bout, boolean isAscending) throws IOException

Overrides io.github.spannm.jackcess.impl.GeneralLegacyIndexCodes.writeNonNullIndexTextValue.

Converts a 97 index value for a text column into the entry value (which is based on a variety of nifty codes).

Annotations
@Override
io.github.spannm.jackcess.impl back to summary

private final Class General97IndexCodes.Codes

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final GeneralLegacyIndexCodes.CharHandler[]
VALUES

handlers for the first 256 chars.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VALUESback to summary
private static final GeneralLegacyIndexCodes.CharHandler[] VALUES

handlers for the first 256 chars. use nested class to lazy load the handlers

Constructor Detail

Codesback to summary
private Codes()
io.github.spannm.jackcess.impl back to summary

private final Class General97IndexCodes.ExtMappings

extends Object
Class Inheritance
  • java.lang.Object
  • io.github.spannm.jackcess.impl.General97IndexCodes.ExtMappings

Field Summary

Modifier and TypeField and Description
private static final short[]
VALUES

mappings for a small subset of the rest of the chars in BMP 0.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VALUESback to summary
private static final short[] VALUES

mappings for a small subset of the rest of the chars in BMP 0. use nested class to lazy load the handlers. since these codes are for single byte encodings, you would think you wouldn't need any ext codes. however, some chars in the extended range have corollaries in the single byte range. this array holds the mappings from the ext range to the single byte range. chars without mappings go to 0 (ignored).

Constructor Detail

ExtMappingsback to summary
private ExtMappings()
io.github.spannm.jackcess.impl back to summary

protected final Class General97IndexCodes.NibbleStream

extends ByteStream
Class Inheritance

Extension of ByteStream which enables writing individual nibbles.

Field Summary

Modifier and TypeField and Description
private int

Constructor Summary

AccessConstructor and Description
pack-priv
NibbleStream(int length)

Method Summary

Modifier and TypeMethod and Description
private static int
asHiNibble(int b)

private static int
asLowNibble(int b)

private boolean
public void
writeFillNibbles(int length, byte b)

private void
public void
writeNibble(int b)

Inherited from io.github.spannm.jackcess.impl.ByteUtil.ByteStream:
ensureCapacityensureNewCapacitygetgetBytesgetLengthresetsetsetBitsskiptoByteArraytrimTrailingwritewritewritewriteFillwriteTo

Field Detail

nibbleLenback to summary
private int nibbleLen

Constructor Detail

NibbleStreamback to summary
pack-priv NibbleStream(int length)

Method Detail

asHiNibbleback to summary
private static int asHiNibble(int b)
asLowNibbleback to summary
private static int asLowNibble(int b)
nextIsHiback to summary
private boolean nextIsHi()
writeFillNibblesback to summary
public void writeFillNibbles(int length, byte b)
writeLowNibbleback to summary
private void writeLowNibble(int b)
writeNibbleback to summary
public void writeNibble(int b)