< prev index next >

src/java.desktop/share/classes/java/awt/color/ICC_Profile.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2017, 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) 1997, 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
*** 1014,1024 **** * * @exception IllegalArgumentException If the stream does not * contain valid ICC Profile data. */ public static ICC_Profile getInstance(InputStream s) throws IOException { ! byte profileData[]; if (s instanceof ProfileDeferralInfo) { /* hack to detect profiles whose loading can be deferred */ return getDeferredInstance((ProfileDeferralInfo) s); } --- 1014,1024 ---- * * @exception IllegalArgumentException If the stream does not * contain valid ICC Profile data. */ public static ICC_Profile getInstance(InputStream s) throws IOException { ! byte[] profileData; if (s instanceof ProfileDeferralInfo) { /* hack to detect profiles whose loading can be deferred */ return getDeferredInstance((ProfileDeferralInfo) s); }
*** 1030,1043 **** return getInstance(profileData); } static byte[] getProfileDataFromStream(InputStream s) throws IOException { ! byte profileData[]; int profileSize; ! byte header[] = new byte[128]; int bytestoread = 128; int bytesread = 0; int n; while (bytestoread != 0) { --- 1030,1043 ---- return getInstance(profileData); } static byte[] getProfileDataFromStream(InputStream s) throws IOException { ! byte[] profileData; int profileSize; ! byte[] header = new byte[128]; int bytestoread = 128; int bytesread = 0; int n; while (bytestoread != 0) {
*** 1096,1106 **** } } void activateDeferredProfile() throws ProfileDataException { ! byte profileData[]; final String fileName = deferralInfo.filename; profileActivator = null; deferralInfo = null; InputStream is = getStandardProfileInputStream(fileName); --- 1096,1106 ---- } } void activateDeferredProfile() throws ProfileDataException { ! byte[] profileData; final String fileName = deferralInfo.filename; profileActivator = null; deferralInfo = null; InputStream is = getStandardProfileInputStream(fileName);
*** 1284,1294 **** * @exception IOException If the file cannot be opened for writing * or an I/O error occurs while writing to the file. */ public void write(String fileName) throws IOException { FileOutputStream outputFile; ! byte profileData[]; profileData = getData(); /* this will activate deferred profiles if necessary */ outputFile = new FileOutputStream(fileName); outputFile.write(profileData); --- 1284,1294 ---- * @exception IOException If the file cannot be opened for writing * or an I/O error occurs while writing to the file. */ public void write(String fileName) throws IOException { FileOutputStream outputFile; ! byte[] profileData; profileData = getData(); /* this will activate deferred profiles if necessary */ outputFile = new FileOutputStream(fileName); outputFile.write(profileData);
*** 1303,1313 **** * * @exception IOException If an I/O error occurs while writing to the * stream. */ public void write(OutputStream s) throws IOException { ! byte profileData[]; profileData = getData(); /* this will activate deferred profiles if necessary */ s.write(profileData); } --- 1303,1313 ---- * * @exception IOException If an I/O error occurs while writing to the * stream. */ public void write(OutputStream s) throws IOException { ! byte[] profileData; profileData = getData(); /* this will activate deferred profiles if necessary */ s.write(profileData); }
< prev index next >