This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.ncruces.utils; | |
import android.graphics.Bitmap; | |
import androidx.annotation.IntDef; | |
import androidx.annotation.NonNull; | |
import androidx.annotation.RequiresApi; | |
import com.sun.jna.JNIEnv; | |
import com.sun.jna.Native; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.ncruces.utils; | |
import com.sun.jna.IntegerType; | |
import com.sun.jna.Native; | |
@SuppressWarnings("all") | |
public class NativeBool extends IntegerType { | |
private static final long serialVersionUID = 1L; | |
public static final int SIZE = Native.BOOL_SIZE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.ncruces.utils; | |
import android.graphics.Bitmap; | |
import android.os.BadParcelableException; | |
import android.os.Parcel; | |
import android.os.Parcelable; | |
public final class CachedParcelable<T extends Parcelable> implements AutoCloseable { | |
private final Parcelable.Creator<T> creator; | |
private Parcel cache; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.ncruces.utils; | |
import android.os.Bundle; | |
import android.os.IBinder; | |
import android.os.Parcelable; | |
import android.os.PersistableBundle; | |
import android.util.Size; | |
import android.util.SizeF; | |
import android.util.SparseArray; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.ncruces.utils; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import static java.lang.Math.min; | |
public class BoundedInputStream extends InputStream { | |
private final InputStream in; | |
private final long max; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.ncruces.utils; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.NonWritableChannelException; | |
import java.nio.channels.SeekableByteChannel; | |
import static java.lang.Math.min; | |
public final class ByteBufferChannel implements SeekableByteChannel { | |
private final ByteBuffer buf; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.ncruces.utils; | |
import java.io.InputStream; | |
import java.nio.ByteBuffer; | |
public final class ByteBufferInputStream extends InputStream { | |
private final ByteBuffer buf; | |
public ByteBufferInputStream(ByteBuffer buffer) { | |
if (buffer == null) throw new NullPointerException(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.ncruces.utils; | |
public final class CharArraySequence implements CharSequence { | |
private final char[] buf; | |
private final int off, len; | |
public CharArraySequence(char[] value) { | |
buf = value; | |
off = 0; | |
len = value.length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
******************************************************************************* | |
* Copyright (C) 1996-2000, International Business Machines Corporation and * | |
* others. All Rights Reserved. * | |
******************************************************************************* | |
* | |
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/text/SearchIterator.java,v $ | |
* $Date: 2002/04/03 19:13:56 $ | |
* $Revision: 1.6 $ | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.ncruces.utils; | |
import android.content.AsyncTaskLoader; | |
import android.content.Context; | |
import android.os.OperationCanceledException; | |
import static java.lang.Thread.currentThread; | |
import static java.lang.Thread.interrupted; | |
public abstract class InterruptibleAsyncTaskLoader<D> extends AsyncTaskLoader<D> { |