< prev index next >
src/java.desktop/share/classes/java/awt/color/ICC_Profile.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * 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,11 +1014,11 @@
*
* @exception IllegalArgumentException If the stream does not
* contain valid ICC Profile data.
*/
public static ICC_Profile getInstance(InputStream s) throws IOException {
- byte profileData[];
+ byte[] profileData;
if (s instanceof ProfileDeferralInfo) {
/* hack to detect profiles whose loading can be deferred */
return getDeferredInstance((ProfileDeferralInfo) s);
}
@@ -1030,14 +1030,14 @@
return getInstance(profileData);
}
static byte[] getProfileDataFromStream(InputStream s) throws IOException {
- byte profileData[];
+ byte[] profileData;
int profileSize;
- byte header[] = new byte[128];
+ byte[] header = new byte[128];
int bytestoread = 128;
int bytesread = 0;
int n;
while (bytestoread != 0) {
@@ -1096,11 +1096,11 @@
}
}
void activateDeferredProfile() throws ProfileDataException {
- byte profileData[];
+ byte[] profileData;
final String fileName = deferralInfo.filename;
profileActivator = null;
deferralInfo = null;
InputStream is = getStandardProfileInputStream(fileName);
@@ -1284,11 +1284,11 @@
* @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[];
+ byte[] profileData;
profileData = getData(); /* this will activate deferred
profiles if necessary */
outputFile = new FileOutputStream(fileName);
outputFile.write(profileData);
@@ -1303,11 +1303,11 @@
*
* @exception IOException If an I/O error occurs while writing to the
* stream.
*/
public void write(OutputStream s) throws IOException {
- byte profileData[];
+ byte[] profileData;
profileData = getData(); /* this will activate deferred
profiles if necessary */
s.write(profileData);
}
< prev index next >