/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
*/
abstract class ISO2022
extends Charset
{
}
return new Decoder(this);
}
return new Encoder(this);
}
// Value to be filled by subclass
protected byte SODesig[][];
private boolean shiftout;
}
protected void implReset() {
curSODes = 0;
curSS2Des = 0;
curSS3Des = 0;
shiftout = false;
}
{
char[] tmpChar = new char[1];
int i = 0,
tmpIndex = 0;
switch(shiftFlag) {
case SOFlag:
break;
case SS2Flag:
break;
case SS3Flag:
break;
}
if (tmpDecoder != null) {
if(tmpIndex == i) {
try {
} catch (Exception e) {}
}
}
}
return REPLACE_CHAR;
}
int i = 0;
int j = 0;
return i;
}
i++;
}
return -1;
}
int i = 0;
int j = 0;
return i;
}
i++;
}
return -1;
}
{
try {
int inputSize = 1;
switch (b1) {
case ISO_SO:
shiftout = true;
inputSize = 1;
break;
case ISO_SI:
shiftout = false;
inputSize = 1;
break;
case ISO_ESC:
return CoderResult.UNDERFLOW;
if (desig != -1) {
break;
}
if (desig != -1) {
break;
}
if (desig != -1) {
break;
}
return CoderResult.UNDERFLOW;
switch(b1) {
case ISO_SS2_7:
return CoderResult.UNDERFLOW;
return CoderResult.OVERFLOW;
(byte)b3,
SS2Flag);
dp++;
inputSize = 4;
break;
case ISO_SS3_7:
return CoderResult.UNDERFLOW;
return CoderResult.OVERFLOW;
(byte)b3,
SS3Flag);
dp++;
inputSize = 4;
break;
default:
}
break;
default:
return CoderResult.OVERFLOW;
if (!shiftout) {
} else {
return CoderResult.OVERFLOW;
return CoderResult.UNDERFLOW;
(byte)b2,
SOFlag);
inputSize = 2;
}
break;
}
}
return CoderResult.UNDERFLOW;
} finally {
}
}
{
try {
while (src.hasRemaining()) {
int inputSize = 1;
switch (b1) {
case ISO_SO:
shiftout = true;
break;
case ISO_SI:
shiftout = false;
break;
case ISO_ESC:
return CoderResult.UNDERFLOW;
if (desig != -1) {
break;
}
if (desig != -1) {
break;
}
if (desig != -1) {
break;
}
return CoderResult.UNDERFLOW;
switch(b1) {
case ISO_SS2_7:
return CoderResult.UNDERFLOW;
return CoderResult.OVERFLOW;
(byte)b3,
SS2Flag));
inputSize = 4;
break;
case ISO_SS3_7:
return CoderResult.UNDERFLOW;
return CoderResult.OVERFLOW;
(byte)b3,
SS3Flag));
inputSize = 4;
break;
default:
}
break;
default:
return CoderResult.OVERFLOW;
if (!shiftout) {
} else {
return CoderResult.OVERFLOW;
return CoderResult.UNDERFLOW;
(byte)b2,
SOFlag));
inputSize = 2;
}
break;
}
}
return CoderResult.UNDERFLOW;
finally {
}
}
{
else
}
}
private boolean shiftout = false;
private boolean SODesDefined = false;
private boolean SS2DesDefined = false;
private boolean SS3DesDefined = false;
private boolean newshiftout = false;
private boolean newSODesDefined = false;
private boolean newSS2DesDefined = false;
private boolean newSS3DesDefined = false;
}
public boolean canEncode(char c) {
return (ISOEncoder.canEncode(c));
}
protected void implReset() {
shiftout = false;
SODesDefined = false;
SS2DesDefined = false;
SS3DesDefined = false;
}
{
int index = 0;
byte tmpByte[];
byte convByte[] = new byte[4];
int converted;
try{
} catch(Exception e) {
return -1;
}
if (converted == 2) {
if (!SODesDefined) {
newSODesDefined = true;
}
if (!shiftout) {
newshiftout = true;
}
} else {
if (!SS2DesDefined) {
newSS2DesDefined = true;
}
if(!SS3DesDefined){
newSS3DesDefined = true;
}
}
}
}
return index;
}
{
int outputSize = 0;
byte[] outputByte = new byte[8];
try {
if (Character.isSurrogate(c)) {
return sgp.unmappableResult();
}
if (c < 0x80) { // ASCII
if (shiftout){
newshiftout = false;
outputSize = 2;
} else {
outputSize = 1;
}
newSODesDefined = false;
newSS2DesDefined = false;
newSS3DesDefined = false;
}
} else {
if (outputSize == 0) {
}
}
return CoderResult.OVERFLOW;
for (int i = 0; i < outputSize; i++)
sp++;
}
return CoderResult.UNDERFLOW;
} finally {
}
}
{
int outputSize = 0;
byte[] outputByte = new byte[8];
try {
while (src.hasRemaining()) {
return sgp.unmappableResult();
}
if (shiftout){
newshiftout = false;
outputSize = 2;
} else {
outputSize = 1;
}
if(inputChar == '\n'){
newSODesDefined = false;
newSS2DesDefined = false;
newSS3DesDefined = false;
}
} else {
if (outputSize == 0) {
}
}
return CoderResult.OVERFLOW;
for (int i = 0; i < outputSize; i++)
mark++;
}
return CoderResult.UNDERFLOW;
} finally {
}
}
{
else
}
}
}