Skip to content

Commit

Permalink
initial code removal
Browse files Browse the repository at this point in the history
  • Loading branch information
carljmosca committed May 15, 2024
1 parent 444f9e1 commit d58e247
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 327 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1582,11 +1582,11 @@ protected IonType load_number(StringBuilder sb) throws IOException
int c2 = read_char();
if (Radix.HEX.isPrefix(c2)) {
sb.append((char)c);
c = loadRadixValue(sb, has_sign, c2, Radix.HEX);
c = loadRadixValue(sb, c2, Radix.HEX);
return load_finish_number(sb, c, IonTokenConstsX.TOKEN_HEX);
} else if (Radix.BINARY.isPrefix(c2)) {
sb.append((char) c);
c = loadRadixValue(sb, has_sign, c2, Radix.BINARY);
c = loadRadixValue(sb, c2, Radix.BINARY);
return load_finish_number(sb, c, IonTokenConstsX.TOKEN_BINARY);
}
// not a next value, back up and try again
Expand Down Expand Up @@ -1843,7 +1843,7 @@ else if (c == '+' || c == '-') {
return load_finish_number(sb, c, IonTokenConstsX.TOKEN_TIMESTAMP);
}

private final int loadRadixValue(StringBuilder sb, boolean has_sign, int c2, Radix radix)
private final int loadRadixValue(StringBuilder sb, int c2, Radix radix)
throws IOException
{
radix.assertPrefix(c2);
Expand Down
311 changes: 0 additions & 311 deletions src/main/java/com/amazon/ion/impl/IonTextBufferedStream.java

This file was deleted.

13 changes: 0 additions & 13 deletions src/main/java/com/amazon/ion/impl/UnifiedInputStreamX.java
Original file line number Diff line number Diff line change
Expand Up @@ -383,19 +383,6 @@ public final int read(byte[] dst, int offset, int length) throws IOException
}
return length - remaining;
}
private int read_utf8(int c) throws IOException
{
int len = IonUTF8.getUTF8LengthFromFirstByte(c);
for (int ii=1; ii<len; ii++) {
int c2 = read();
if (c2 == -1) {
throw new IonReaderTextTokenException("invalid UTF8 sequence encountered in stream");
}
c |= (c2 << (ii*8));
}
c = IonUTF8.getScalarFrom4BytesReversed(c);
return c;
}

/**
* the refill method is the key override that is filled in by
Expand Down

0 comments on commit d58e247

Please sign in to comment.