source: osm/applications/editors/josm/plugins/importvec/src/com/kitfox/svg/xml/Base64Util.java@ 23707

Last change on this file since 23707 was 23707, checked in by upliner, 14 years ago

Add importvec plugin stub

File size: 719 bytes
Line 
1/*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5
6package com.kitfox.svg.xml;
7
8/**
9 *
10 * @author kitfox
11 */
12public class Base64Util
13{
14 static final byte[] valueToBase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".getBytes();
15 static final byte[] base64ToValue = new byte[128];
16 static {
17 for (int i = 0; i < valueToBase64.length; ++i)
18 {
19 base64ToValue[valueToBase64[i]] = (byte)i;
20 }
21 }
22
23 static public byte encodeByte(int value)
24 {
25 return valueToBase64[value];
26 }
27
28 static public byte decodeByte(int base64Char)
29 {
30 return base64ToValue[base64Char];
31 }
32}
Note: See TracBrowser for help on using the repository browser.