Д
Size: a a a
Д
g
g
А
public static boolean isZipFile(File file) throws IOException {
if(file.isDirectory()) {
return false;
}
if(!file.canRead()) {
throw new IOException("Cannot read file "+file.getAbsolutePath());
}
if(file.length() < 4) {
return false;
}
DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)));
int test = in.readInt();
in.close();
return test == 0x504b0304;
}
}
Д
Д
public static boolean isZipFile(File file) throws IOException {
if(file.isDirectory()) {
return false;
}
if(!file.canRead()) {
throw new IOException("Cannot read file "+file.getAbsolutePath());
}
if(file.length() < 4) {
return false;
}
DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)));
int test = in.readInt();
in.close();
return test == 0x504b0304;
}
}
Д
g
A
GV
AA
A
A
DC
nk
DS
nk
RG
С
nk