This file contains 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
using Newtonsoft.Json; | |
using System; | |
using System.Collections; | |
using System.Reflection; | |
namespace Newtonsoft.Json.Converters | |
{ | |
/// <summary> | |
/// Converts a <see cref="Tuple"/> to and from a JSON array. | |
/// </summary> |
This file contains 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
using System; | |
using System.Globalization; | |
using System.Reflection; | |
namespace Refit | |
{ | |
public sealed class InvariantUrlParameterFormatter : IUrlParameterFormatter | |
{ | |
public string Format(object parameterValue, ParameterInfo parameterInfo) | |
{ |
This file contains 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.text.CharacterIterator; | |
public final class CharSequenceCharacterIterator implements CharacterIterator { | |
private final CharSequence seq; | |
private int pos; | |
public CharSequenceCharacterIterator(CharSequence sequence) { | |
if (sequence == null) throw new NullPointerException(); |
This file contains 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.OutputStream; | |
import java.nio.ByteBuffer; | |
import static java.lang.Math.max; | |
public final class ByteBufferOutputStream extends OutputStream { | |
private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8; | |
private ByteBuffer buf; |
This file contains 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> { |
This file contains 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 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 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 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 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; |
OlderNewer