try {
byte[] enc = ic.load();
String e = ic.encode(enc);
try (OutputStream out = new FileOutputStream("D:\\java\\ImgCrypto\\img\\image.jpg")) {
out.write(ic.decode(e));
}
} catch (IOException e) { }
}
public byte[] load() throws FileNotFoundException, IOException {
InputStream in = new FileInputStream("D:\\java\\ImgCrypto\\img\\20130826_103942.jpg");
ByteArrayOutputStream bout = new ByteArrayOutputStream();
byte[] buffer = new byte[32 * 1024];
while (true) {
int r = in.read(buffer);
if (r > 0) { bout.write(buffer, 0, r); }
else { break; }
}
bout.close();
return bout.toByteArray();
}
//——————————————————-
public final String encode(byte[] d) {
if (d == null) return null;
byte data[] = new byte[d.length+2];
System.arraycopy(d, 0, data, 0, d.length);
byte dest[] = new byte[(data.length/3)*4];
public final String encode(String s) { return encode(s.getBytes()); }
public final byte[] decode(String str) {
if (str == null) { return null; }
byte data[] = str.getBytes();
return decode(data);
}
public final static byte[] decode(byte[] data) {
int tail = data.length;
while (data[tail-1] == '=') { tail--; }
byte dest[] = new byte[tail - data.length/4];
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Здравствуйте, подскажите какой тег использовать для увеличения значения, пример на картинке.
Вроде, про такой тег я слышала. Если есть тег прогресс бар, значит и такое должно быть.
Question
lolka84
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.