< prev index next >
src/java.desktop/share/classes/sun/awt/image/XbmImageDecoder.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1995, 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 42,52 ****
* 0xnn,0xnn,0xnn,0xnn};
*
* @author James Gosling
*/
public class XbmImageDecoder extends ImageDecoder {
! private static byte XbmColormap[] = {(byte) 255, (byte) 255, (byte) 255,
0, 0, 0};
private static int XbmHints = (ImageConsumer.TOPDOWNLEFTRIGHT |
ImageConsumer.COMPLETESCANLINES |
ImageConsumer.SINGLEPASS |
ImageConsumer.SINGLEFRAME);
--- 42,52 ----
* 0xnn,0xnn,0xnn,0xnn};
*
* @author James Gosling
*/
public class XbmImageDecoder extends ImageDecoder {
! private static byte[] XbmColormap = {(byte) 255, (byte) 255, (byte) 255,
0, 0, 0};
private static int XbmHints = (ImageConsumer.TOPDOWNLEFTRIGHT |
ImageConsumer.COMPLETESCANLINES |
ImageConsumer.SINGLEPASS |
ImageConsumer.SINGLEFRAME);
*** 70,89 ****
/**
* produce an image from the stream.
*/
public void produceImage() throws IOException, ImageFormatException {
! char nm[] = new char[80];
int c;
int i = 0;
int state = 0;
int H = 0;
int W = 0;
int x = 0;
int y = 0;
boolean start = true;
! byte raster[] = null;
IndexColorModel model = null;
while (!aborted && (c = input.read()) != -1) {
if ('a' <= c && c <= 'z' ||
'A' <= c && c <= 'Z' ||
'0' <= c && c <= '9' || c == '#' || c == '_') {
--- 70,89 ----
/**
* produce an image from the stream.
*/
public void produceImage() throws IOException, ImageFormatException {
! char[] nm = new char[80];
int c;
int i = 0;
int state = 0;
int H = 0;
int W = 0;
int x = 0;
int y = 0;
boolean start = true;
! byte[] raster = null;
IndexColorModel model = null;
while (!aborted && (c = input.read()) != -1) {
if ('a' <= c && c <= 'z' ||
'A' <= c && c <= 'Z' ||
'0' <= c && c <= '9' || c == '#' || c == '_') {
< prev index next >