int limit = offset + length;
for(int bpos = offset; bpos < limit; bpos++){
byte bval = errorArray[bpos];
- if( ! this.hasByte1st){
- if(ShiftJis.isShiftJIS1stByte(bval)){
- this.byte1st = bval;
- this.hasByte1st = true;
- }else{
- getContent().addDecodeError(bval);
- }
- }else{
+
+ if(this.hasByte1st){
if(ShiftJis.isShiftJIS2ndByte(bval)){ // 文字集合エラー
getContent().addDecodeError(this.byte1st, bval);
this.hasByte1st = false;
getContent().addDecodeError(bval);
this.hasByte1st = false;
}
+ }else{
+ if(ShiftJis.isShiftJIS1stByte(bval)){
+ this.byte1st = bval;
+ this.hasByte1st = true;
+ }else{
+ getContent().addDecodeError(bval);
+ }
}
+
}
return;