I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 72b9c92a authored by zzz's avatar zzz
Browse files

better 7 bit error message

parent 349255d2
No related branches found
No related tags found
No related merge requests found
...@@ -71,13 +71,13 @@ public class SevenBit implements Encoding { ...@@ -71,13 +71,13 @@ public class SevenBit implements Encoding {
int backupOffset = offset; int backupOffset = offset;
while( length-- > 0 ) { while( length-- > 0 ) {
byte b = in[offset++]; byte b = in[offset++];
if( b > 32 && b < 127 ) if( b >= 32 && b < 127 )
continue; continue;
if( b == ' ' || b == '\t' ) if( b == '\t' )
continue; continue;
if( b == '\r' || b == '\n' ) if( b == '\r' || b == '\n' )
continue; continue;
throw new DecodingException( "No 8bit Data allowed (" + b + ")" ); throw new DecodingException( "No 8 bit data allowed in 7 bit encoding (" + b + ')' );
} }
return new ReadBuffer(in, backupOffset, backupLength); return new ReadBuffer(in, backupOffset, backupLength);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment