diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2011-04-03 19:27:34 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2011-04-03 19:27:34 +0000 |
commit | e287fba735a45589e5b413a4cffe629b403f7a21 (patch) | |
tree | d65f02d8c93829e5e4284779a346c66a85cb0519 /src/java/com | |
parent | 68da7f6fc22ffd36ee9911803efb561675987f3d (diff) | |
download | jackcess-e287fba735a45589e5b413a4cffe629b403f7a21.tar.gz jackcess-e287fba735a45589e5b413a4cffe629b403f7a21.zip |
slightly more compressed index codes file format
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@543 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/java/com')
-rw-r--r-- | src/java/com/healthmarketscience/jackcess/GeneralLegacyIndexCodes.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/GeneralLegacyIndexCodes.java b/src/java/com/healthmarketscience/jackcess/GeneralLegacyIndexCodes.java index 0083b6b..430942a 100644 --- a/src/java/com/healthmarketscience/jackcess/GeneralLegacyIndexCodes.java +++ b/src/java/com/healthmarketscience/jackcess/GeneralLegacyIndexCodes.java @@ -129,10 +129,10 @@ public class GeneralLegacyIndexCodes { } /** - * Base class for the handlers which hold thetext index character encoding + * Base class for the handlers which hold the text index character encoding * information. */ - abstract static class CharHandler { + private abstract static class CharHandler { public abstract Type getType(); public byte[] getInlineBytes() { return null; @@ -365,7 +365,7 @@ public class GeneralLegacyIndexCodes { String codeLine) { String prefix = codeLine.substring(0, 1); - String suffix = ((codeLine.length() > 1) ? codeLine.substring(2) : ""); + String suffix = ((codeLine.length() > 1) ? codeLine.substring(1) : ""); return prefixMap.get(prefix).parseCodes(suffix.split(",", -1)); } @@ -456,6 +456,10 @@ public class GeneralLegacyIndexCodes { } return null; } + if((codes.length() % 2) != 0) { + // stripped a leading 0 + codes = "0" + codes; + } byte[] bytes = new byte[codes.length() / 2]; for(int i = 0; i < bytes.length; ++i) { int charIdx = i*2; |