List of usage examples for java.lang InternalError InternalError
public InternalError()
InternalError
with no detail message. From source file:Base64.java
/** * Base64 encodes the specified bytes.// www .j a v a2 s .c o m * * @param bytes the bytes to encode * @return the encoded bytes */ public static byte[] encode(byte[] bytes) { ByteArrayOutputStream out = new ByteArrayOutputStream(); int count = 0; int carry = 0; for (int i = 0; i < bytes.length; i++) { byte b = bytes[i]; switch (count++ % 3) { // first byte of 24-bits: write 6-bits and carry 2-bits case 0: out.write(ENCODE[b >> 2]); carry = b & 0x03; break; // second byte of 24-bits: write carry + 4-bits, carry 4-bits case 1: out.write(ENCODE[(carry << 4) + (b >> 4)]); carry = b & 0x0F; break; // third byte of 24-bits: write carry + 2-bits, write 6-bits case 2: out.write(ENCODE[(carry << 2) + (b >> 6)]); out.write(ENCODE[b & 0x3F]); break; default: throw new InternalError(); } } switch (count % 3) { // third byte of 24-bits: 24-bit aligned case 0: break; // first byte of 24-bits: write 4-bit carry and pad 16-bits case 1: out.write(ENCODE[carry << 4]); out.write(PAD_CHAR); out.write(PAD_CHAR); break; // second byte of 24-bits: write 2-bit carry and pad 8-bits case 2: out.write(ENCODE[carry << 2]); out.write(PAD_CHAR); break; default: throw new InternalError(); } return out.toByteArray(); }
From source file:phex.rules.condition.MediaTypeCondition.java
public synchronized Object clone() { try {// w ww . java 2 s . c om MediaTypeCondition clone = (MediaTypeCondition) super.clone(); clone.types = new ListOrderedSet(); clone.types.addAll(types); return clone; } catch (CloneNotSupportedException exp) { throw new InternalError(); } }
From source file:com.echopf.members.ECHOMailmagObject.java
public void fetchInBackground(FetchCallback<ECHOMailmagObject> callback) { try {//from w ww . ja v a 2s . co m doFetch(false, callback); } catch (ECHOException e) { throw new InternalError(); } }
From source file:com.echopf.ECHOInstallation.java
/** * {@.en Gets registration ID from the GCM server in a background thread. * A callback is done in the main (UI) thread after the getting.} * {@.ja ???registrationID???????????}//from w w w .j a v a 2 s. c om * * @param callback */ public void getRegistrationIdInBackground(InstallationCallback callback) { try { doGetRegistrationId(false, callback); } catch (ECHOException e) { throw new InternalError(); } }
From source file:net.gtaun.shoebill.data.Area.java
@Override public Area clone() { try {/*from w w w. ja v a 2s . c om*/ return (Area) super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(); } }
From source file:net.sf.eclipsecs.core.config.ResolvableProperty.java
/** * {@inheritDoc}/*from w ww.ja va 2 s . c o m*/ */ public ResolvableProperty clone() { try { ResolvableProperty clone = (ResolvableProperty) super.clone(); return clone; } catch (CloneNotSupportedException e) { throw new InternalError(); // should never happen } }
From source file:com.echopf.members.ECHOPushNotificationObject.java
public void fetchInBackground(FetchCallback<ECHOPushNotificationObject> callback) { try {/*from w w w. j av a2 s.c o m*/ doFetch(false, callback); } catch (ECHOException e) { throw new InternalError(); } }
From source file:com.echopf.members.ECHOMemberObject.java
public void fetchInBackground(FetchCallback<ECHOMemberObject> callback) { try {//from www.j av a2s .co m doFetch(false, callback); } catch (ECHOException e) { throw new InternalError(); } }
From source file:com.echopf.contents.databases.ECHORecordObject.java
public void fetchInBackground(FetchCallback<ECHORecordObject> callback) { try {// w w w . j av a2 s .c o m doFetch(false, callback); } catch (ECHOException e) { throw new InternalError(); } }
From source file:phex.rules.condition.FileUrnCondition.java
@Override public synchronized Object clone() { try {// w ww .j a v a 2 s . c o m FileUrnCondition clone = (FileUrnCondition) super.clone(); clone.urnSet = new ListOrderedSet(); clone.urnSet.addAll(urnSet); return clone; } catch (CloneNotSupportedException exp) { throw new InternalError(); } }