name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
zxing_ECIStringBuilder_appendCharacters_rdh | /**
* Appends the characters from {@code value} (unlike all other append methods of this class who append bytes)
*
* @param value
* characters to append
*/
public void appendCharacters(StringBuilder value) {
encodeCurrentBytesIfAny();result.append(value);
} | 3.26 |
zxing_ECIStringBuilder_appendECI_rdh | /**
* Appends ECI value to output.
*
* @param value
* ECI value to append, as an int
* @throws FormatException
* on invalid ECI value
*/
public void appendECI(int value) throws
FormatException {
encodeCurrentBytesIfAny();
CharacterSetECI characterSetECI = CharacterSetECI.getCharacterSetECIByValue(val... | 3.26 |
zxing_ECIStringBuilder_isEmpty_rdh | /**
*
* @return true iff nothing has been appended
*/
public boolean isEmpty() {
return (currentBytes.length() == 0) && ((result == null) || (result.length() == 0));
} | 3.26 |
zxing_ECIStringBuilder_append_rdh | /**
* Append the string repesentation of {@code value} (short for {@code append(String.valueOf(value))})
*
* @param value
* int to append as a string
*/
public void append(int value) {
append(String.valueOf(value));
} | 3.26 |
zxing_ECIStringBuilder_length_rdh | /**
* Short for {@code toString().length()} (if possible, use {@link #isEmpty()} instead)
*
* @return length of string representation in characters
*/
public int length() {
return toString().length();
} | 3.26 |
zxing_EAN13Reader_determineFirstDigit_rdh | /**
* Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded
* digits in a barcode, determines the implicitly encoded first digit and adds it to the
* result string.
*
* @param resultString
* string to insert decoded first digit into
* @param lgPatternFound
* int whose bi... | 3.26 |
zxing_CameraConfigurationManager_initFromCameraParameters_rdh | /**
* Reads, one time, values from the camera that are needed by the app.
*/
void initFromCameraParameters(OpenCamera camera) {
Camera.Parameters parameters = camera.getCamera().getParameters();
WindowManager manager = ((WindowManager) (context.getSystemService(Context.WINDOW_SERVICE)));
Display display =... | 3.26 |
zxing_EmailDoCoMoResultParser_isBasicallyValidEmailAddress_rdh | /**
* This implements only the most basic checking for an email address's validity -- that it contains
* an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of
* validity. We want to generally be lenient here since this class is only intended to encapsulate what's
* in a b... | 3.26 |
zxing_PDF417Writer_bitMatrixFromEncoder_rdh | /**
* Takes encoder, accounts for width/height, and retrieves bit matrix
*/
private static BitMatrix bitMatrixFromEncoder(PDF417 encoder, String contents, int errorCorrectionLevel, int width, int height, int margin, boolean autoECI) throws WriterException {
encoder.generateBarcodeLogic(contents, errorCorrectionLe... | 3.26 |
zxing_PDF417Writer_bitMatrixFromBitArray_rdh | /**
* This takes an array holding the values of the PDF 417
*
* @param input
* a byte array of information with 0 is black, and 1 is white
* @param margin
* border around the barcode
* @return BitMatrix of the input
*/
private static BitMatrix bitMatrixFromBitArray(byte[][] input, int margin)
{
// Cre... | 3.26 |
zxing_PDF417Writer_rotateArray_rdh | /**
* Takes and rotates the it 90 degrees
*/
private static byte[][] rotateArray(byte[][] bitarray) {
byte[][] temp = new byte[bitarray[0].length][bitarray.length];
for (int ii = 0; ii < bitarray.length; ii++) {
// This makes the direction consistent on screen when rotating the
// screen;
... | 3.26 |
zxing_BufferedImageLuminanceSource_isRotateSupported_rdh | /**
* This is always true, since the image is a gray-scale image.
*
* @return true
*/
@Override
public boolean isRotateSupported() {return true;
} | 3.26 |
zxing_Code93Writer_appendPattern_rdh | /**
*
* @param target
* output to append to
* @param pos
* start position
* @param pattern
* pattern to append
* @param startColor
* unused
* @return 9
* @deprecated without replacement; intended as an internal-only method
*/
@Deprecated
pr... | 3.26 |
zxing_Code93Writer_encode_rdh | /**
*
* @param contents
* barcode contents to encode. It should not be encoded for extended characters.
* @return a {@code boolean[]} of horizontal pixels (false = white, true = black)
*/
@Override
public boolean[] encode(String contents) {
contents = convertToExtended(contents);
int length = contents... | 3.26 |
zxing_AbstractDoCoMoResultParser_matchDoCoMoPrefixedField_rdh | /**
* <p>See
* <a href="http://www.nttdocomo.co.jp/english/service/imode/make/content/barcode/about/s2.html">
* DoCoMo's documentation</a> about the result types represented by subclasses of this class.</p>
*
* <p>Thanks to Jeff Griffin for proposing rewrite of these classes that relies less
* on exception-based ... | 3.26 |
zxing_BarcodeRow_addBar_rdh | /**
*
* @param black
* A boolean which is true if the bar black false if it is white
* @param width
* How many spots wide the bar is.
*/
void addBar(boolean black, int width) {
for (int ii = 0; ii < width; ii++) {
set(currentLocation++, black);
}
} | 3.26 |
zxing_BarcodeRow_getScaledRow_rdh | /**
* This function scales the row
*
* @param scale
* How much you want the image to be scaled, must be greater than or equal to 1.
* @return the scaled row
*/
byte[] getScaledRow(int scale) {
byte[] output = new byte[row.length * scale];
for (int i = 0; i < output.length; i++) {
output[i] = ... | 3.26 |
zxing_BarcodeRow_set_rdh | /**
* Sets a specific location in the bar
*
* @param x
* The location in the bar
* @param black
* Black if true, white if false;
*/
private void set(int x, boolean black) {
row[x] = ((byte) ((black) ? 1 : 0));
} | 3.26 |
zxing_PDF417Common_m0_rdh | /**
*
* @param symbol
* encoded symbol to translate to a codeword
* @return the codeword corresponding to the symbol.
*/
public static int m0(int symbol) {
int i = Arrays.binarySearch(SYMBOL_TABLE, symbol & 0x3ffff);
if (i
< 0) {
return -1;
}
return (CODEWORD_TABLE[i] - 1) % NUMBER... | 3.26 |
zxing_HttpHelper_downloadViaHttp_rdh | /**
*
* @param uri
* URI to retrieve
* @param type
* expected text-like MIME type of that content
* @param maxChars
* approximate maximum characters to read from the source
* @return content as a {@code String}
* @throws IOException
* if the content can't be retrieved because of a bad URI, network pro... | 3.26 |
zxing_EmailAddressParsedResult_getMailtoURI_rdh | /**
*
* @return "mailto:"
* @deprecated without replacement
*/
@Deprecated
public String getMailtoURI() {
return "mailto:";
} | 3.26 |
zxing_BitMatrix_set_rdh | /**
* <p>Sets the given bit to true.</p>
*
* @param x
* The horizontal component (i.e. which column)
* @param y
* The vertical component (i.e. which row)
*/
public void set(int x, int y) {
int offset = (y * rowSize) + (x / 32);
bits[offset] |= 1 << (x & 0x1f);
} | 3.26 |
zxing_BitMatrix_toString_rdh | /**
*
* @param setString
* representation of a set bit
* @param unsetString
* representation of an unset bit
* @param lineSeparator
* newline character in string representation
* @return string representation of entire matrix utilizing given strings and line separator
* @deprecated call {@link #toString(... | 3.26 |
zxing_BitMatrix_getHeight_rdh | /**
*
* @return The height of the matrix
*/
public int getHeight() {
return height;
} | 3.26 |
zxing_BitMatrix_flip_rdh | /**
* <p>Flips every bit in the matrix.</p>
*/
public void flip() {
int max = bits.length; for (int i = 0; i < max; i++) {
bits[i] = ~bits[i];
}
} | 3.26 |
zxing_BitMatrix_getRowSize_rdh | /**
*
* @return The row size of the matrix
*/
public int getRowSize() {
return rowSize;
} | 3.26 |
zxing_BitMatrix_getWidth_rdh | /**
*
* @return The width of the matrix
*/
public int getWidth() {
return width;
} | 3.26 |
zxing_BitMatrix_setRegion_rdh | /**
* <p>Sets a square region of the bit matrix to true.</p>
*
* @param left
* The horizontal position to begin at (inclusive)
* @param top
* The vertical position to begin at (inclusive)
* @param width
* The width of the region
* @param height
* The height of the region
*/
public void setRegion(int ... | 3.26 |
zxing_BitMatrix_clear_rdh | /**
* Clears all bits (sets to false).
*/
public void clear() {
int max = bits.length;
for (int i = 0; i < max; i++) {bits[i] = 0;
}} | 3.26 |
zxing_BitMatrix_rotate_rdh | /**
* Modifies this {@code BitMatrix} to represent the same but rotated the given degrees (0, 90, 180, 270)
*
* @param degrees
* number of degrees to rotate through counter-clockwise (0, 90, 180, 270)
*/
public void rotate(int degrees) {
switch (degrees % 360) {
case 0 :
return;
case 90 :
... | 3.26 |
zxing_BitMatrix_xor_rdh | /**
* Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding
* mask bit is set.
*
* @param mask
* XOR mask
*/
public void xor(BitMatrix mask) {
if (((width != mask.width) || (height != mask.height)) || (rowSize != mask.rowSize)) {
throw new IllegalArgumentException("input m... | 3.26 |
zxing_BitMatrix_parse_rdh | /**
* Interprets a 2D array of booleans as a {@code BitMatrix}, where "true" means an "on" bit.
*
* @param image
* bits of the image, as a row-major 2D array. Elements are arrays representing rows
* @return {@code BitMatrix} representation of image
*/
public static BitMatrix parse(boolean[][] image) {int heigh... | 3.26 |
zxing_BitMatrix_setRow_rdh | /**
*
* @param y
* row to set
* @param row
* {@link BitArray} to copy from
*/
public void setRow(int y, BitArray row) {
System.arraycopy(row.getBitArray(), 0, bits, y * rowSize, rowSize);
} | 3.26 |
zxing_BitMatrix_getTopLeftOnBit_rdh | /**
* This is useful in detecting a corner of a 'pure' barcode.
*
* @return {@code x,y} coordinate of top-left-most 1 bit, or null if it is all white
*/
public int[] getTopLeftOnBit() {
int bitsOffset = 0;
while ((bitsOffset < bits.length) && (bits[bitsOffset] == 0)) {
bitsOffset++;
}
if (b... | 3.26 |
zxing_BitMatrix_rotate180_rdh | /**
* Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees
*/
public void rotate180() {
BitArray topRow = new BitArray(width);
BitArray bottomRow = new
BitArray(width);
int maxHeight = (height + 1) / 2;for (int i = 0; i < maxHeight; i++) {
topRow = getRow(i, topRow);
... | 3.26 |
zxing_BitMatrix_get_rdh | /**
* <p>Gets the requested bit, where true means black.</p>
*
* @param x
* The horizontal component (i.e. which column)
* @param y
* The vertical component (i.e. which row)
* @return value of given bit in matrix
*/public boolean get(int x, int y) {
int offset = (y * rowSize) + (x / 32);
return ((bi... | 3.26 |
zxing_BitMatrix_getEnclosingRectangle_rdh | /**
* This is useful in detecting the enclosing rectangle of a 'pure' barcode.
*
* @return {@code left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white
*/public int[] getEnclosingRectangle() {
int left = width;
int top = height;
int right
= -1;
int bottom = -1;
... | 3.26 |
zxing_Result_getRawBytes_rdh | /**
*
* @return raw bytes encoded by the barcode, if applicable, otherwise {@code null}
*/
public byte[] getRawBytes() {
return rawBytes;
} | 3.26 |
zxing_Result_getNumBits_rdh | /**
*
* @return how many bits of {@link #getRawBytes()} are valid; typically 8 times its length
* @since 3.3.0
*/
public int getNumBits() {
return numBits; } | 3.26 |
zxing_Result_getBarcodeFormat_rdh | /**
*
* @return {@link BarcodeFormat} representing the format of the barcode that was decoded
*/
public BarcodeFormat getBarcodeFormat() {
return format;
}
/**
*
* @return {@link Map} mapping {@link ResultMetadataType} keys to values. May be
{@code null} | 3.26 |
zxing_Result_getText_rdh | /**
*
* @return raw text encoded by the barcode
*/
public String getText() {
return text;
} | 3.26 |
zxing_AztecReader_decode_rdh | /**
* Locates and decodes a Data Matrix code in an image.
*
* @return a String representing the content encoded by the Data Matrix code
* @throws NotFoundException
* if a Data Matrix code cannot be found
* @throws FormatException
* if a Data Matrix code cannot be decoded
*/
@Override
public Result decode(Bi... | 3.26 |
zxing_DetectionResult_adjustRowNumber_rdh | /**
*
* @return true, if row number was adjusted, false otherwise
*/
private static boolean
adjustRowNumber(Codeword codeword,
Codeword otherCodeword) {
if (otherCodeword
== null) {
return false;
}
if (otherCodeword.hasValidRowNumber() && (otherCodeword.getBucket() == codeword.getBucket()))
... | 3.26 |
zxing_QRCodeDecoderMetaData_applyMirroredCorrection_rdh | /**
* Apply the result points' order correction due to mirroring.
*
* @param points
* Array of points to apply mirror correction to.
*/
public void applyMirroredCorrection(ResultPoint[] points) {
if (((!mirrored) || (points == null)) || (points.length < 3)) {
return;
}
Resu... | 3.26 |
zxing_QRCodeDecoderMetaData_isMirrored_rdh | /**
*
* @return true if the QR Code was mirrored.
*/
public boolean isMirrored() {
return mirrored;
} | 3.26 |
zxing_BitArray_set_rdh | /**
* Sets bit i.
*
* @param i
* bit to set
*/
public void set(int i) {bits[i / 32] |= 1 << (i & 0x1f);
} | 3.26 |
zxing_BitArray_setRange_rdh | /**
* Sets a range of bits.
*
* @param start
* start of range, inclusive.
* @param end
* end of range, exclusive
*/
public void setRange(int start,
int end) {
if (((end < start) || (start < 0)) || (end > size)) {
throw new IllegalArgumentException();
}
if (end == start) {
return;... | 3.26 |
zxing_BitArray_reverse_rdh | /**
* Reverses all bits in the array.
*/
public void reverse() {
int[] newBits = new int[bits.length];
// reverse all int's first
int
len
= (size - 1) / 32;
int oldBitsLen = len + 1;
for (int i
= 0; i < oldBitsLen; i++) {
newBits[len -
i] = Integer.reverse(bits[i]); }
// now correct the int's if the bit size isn't a ... | 3.26 |
zxing_BitArray_toBytes_rdh | /**
*
* @param bitOffset
* first bit to start writing
* @param array
* array to write into. Bytes are written most-significant byte first. This is the opposite
* of the internal representation, which is exposed by {@link #getBitArray()}
* @par... | 3.26 |
zxing_BitArray_clear_rdh | /**
* Clears all bits (sets to false).
*/
public void clear() {
int max = bits.length;
for (int i = 0; i < max; i++) {
bits[i] = 0;
}
} | 3.26 |
zxing_BitArray_getNextUnset_rdh | /**
*
* @param from
* index to start looking for unset bit
* @return index of next unset bit, or {@code size} if none are unset until the end
* @see #getNextSet(int)
*/
public int getNextUnset(int from) {
if (from >= size) {
return size;
}
int
bitsOffset = from / 32;
int currentBits
... | 3.26 |
zxing_BitArray_appendBits_rdh | /**
* Appends the least-significant bits, from value, in order from most-significant to
* least-significant. For example, appending 6 bits from 0x000001E will append the bits
* 0, 1, 1, 1, 1, 0 in that order.
*
* @param value
* {@code int} containing bits to append
* @param numBits
* bits from value to appe... | 3.26 |
zxing_BitArray_setBulk_rdh | /**
* Sets a block of 32 bits, starting at bit i.
*
* @param i
* first bit to set
* @param newBits
* the new value of the next 32 bits. Note again that the least-significant bit
* corresponds to bit i, the next-least-significant to i+1, and so on.
*/
public void setBulk(int i, int newBits) {
bits[i ... | 3.26 |
zxing_BitArray_isRange_rdh | /**
* Efficient method to check if a range of bits is set, or not set.
*
* @param start
* start of range, inclusive.
* @param end
* end of range, exclusive
* @param value
* if true, checks that bits in range are set, otherwise checks that they are not set
* @return true iff all bits are set or not set in... | 3.26 |
zxing_BitArray_get_rdh | /**
*
* @param i
* bit to get
* @return true iff bit i is set
*/
public boolean get(int i) {
return (bits[i / 32] & (1 << (i & 0x1f))) != 0;
} | 3.26 |
zxing_BitArray_flip_rdh | /**
* Flips bit i.
*
* @param i
* bit to set
*/
public void flip(int i) {
bits[i / 32] ^= 1 << (i & 0x1f);
} | 3.26 |
zxing_BitSource_getByteOffset_rdh | /**
*
* @return index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}.
*/
public int getByteOffset() {
return byteOffset;
} | 3.26 |
zxing_BitSource_available_rdh | /**
*
* @return number of bits that can be read successfully
*/
public int available() {
return (8 * (bytes.length - byteOffset)) - bitOffset;
} | 3.26 |
zxing_BitSource_getBitOffset_rdh | /**
*
* @return index of next bit in current byte which would be read by the next call to {@link #readBits(int)}.
*/
public int getBitOffset() {
return bitOffset;
} | 3.26 |
zxing_Version_buildVersions_rdh | /**
* See ISO 16022:2006 5.5.1 Table 7
*/
private static Version[] buildVersions() {
return new Version[]{ new Version(1, 10, 10,
8, 8, new ECBlocks(5, new ECB(1, 3))), new Version(2, 12, 12, 10, 10, new ECBlocks(7, new ECB(1, 5))),
new Version(3,
14, 14, 12, 12, new ECBlocks(10, new ECB(1, 8))), new Version(4, 16,... | 3.26 |
zxing_ResultHandler_searchMap_rdh | /**
* Do a geo search using the address as the query.
*
* @param address
* The address to find
*/
final void searchMap(String address) {
launchIntent(new Intent(Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=" + Uri.encode(address))));
} | 3.26 |
zxing_ResultHandler_launchIntent_rdh | /**
* Like {@link #rawLaunchIntent(Intent)} but will show a user dialog if nothing is available to handle.
*/
final void launchIntent(Intent intent) {
try {
rawLaunchIntent(intent);
} catch (ActivityNotFoundException ignored) {
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(string... | 3.26 |
zxing_ResultHandler_areContentsSecure_rdh | /**
* Some barcode contents are considered secure, and should not be saved to history, copied to
* the clipboard, or otherwise persisted.
*
* @return If true, do not create any permanent record of these contents.
*/
public boolean areContentsSecure() {
return false;
} | 3.26 |
zxing_ResultHandler_rawLaunchIntent_rdh | /**
* Like {@link #launchIntent(Intent)} but will tell you if it is not handle-able
* via {@link ActivityNotFoundException}.
*
* @throws ActivityNotFoundException
* if Intent can't be handled
*/
final void rawLaunchIntent(Intent intent)
{
if (intent != null) {
intent.addFlags(Intents.FLAG_NEW_DOC);
activity.st... | 3.26 |
zxing_ResultHandler_getDisplayContents_rdh | /**
* Create a possibly styled string for the contents of the current barcode.
*
* @return The text to be displayed.
*/
public CharSequence getDisplayContents() {
String contents = result.getDisplayResult();
return contents.replace("\r", "");
} | 3.26 |
zxing_ResultHandler_openProductSearch_rdh | // Uses the mobile-specific version of Product Search, which is formatted for small screens.
final void openProductSearch(String upc) {
Uri uri = Uri.parse(((("http://www.google." + LocaleManager.getProductSearchCountryTLD(activity)) + "/m/products?q=") + upc) + "&source=zxing");
launchIntent(new Intent(Intent.ACTIO... | 3.26 |
zxing_ResultHandler_getType_rdh | /**
* A convenience method to get the parsed type. Should not be overridden.
*
* @return The parsed type, e.g. URI or ISBN
*/
public final ParsedResultType getType() {
return result.getType();
} | 3.26 |
zxing_Decoder_correctErrors_rdh | /**
* <p>Given data and error-correction codewords received, possibly corrupted by errors, attempts to
* correct the errors in-place using Reed-Solomon error correction.</p>
*
* @param codewordBytes
* data and error correction codewords
* @param numDataCodewords
* number of codewords that are data bytes
* @... | 3.26 |
zxing_Decoder_decode_rdh | /**
* <p>Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.</p>
*
* @param bits
* booleans representing white/black QR Code modules
* @param hints
* decoding hints that should be used to influence decoding
* @return text and bytes encoded within the QR Code
... | 3.26 |
zxing_ByteMatrix_getArray_rdh | /**
*
* @return an internal representation as bytes, in row-major order. array[y][x] represents point (x,y)
*/
public byte[][] getArray() {return bytes;
} | 3.26 |
zxing_QRCodeEncoder_encodeContentsFromShareIntent_rdh | // Handles send intents from multitude of Android applications
private void encodeContentsFromShareIntent(Intent intent) throws WriterException {
// Check if this is a plain text encoding, or contact
if (intent.hasExtra(Intent.EXTRA_STREAM)) {
encodeFromStreamExtra(intent);
} else {
encodeFromTextExtras(inten... | 3.26 |
zxing_QRCodeEncoder_encodeContentsFromZXingIntent_rdh | // It would be nice if the string encoding lived in the core ZXing library,
// but we use platform specific code like PhoneNumberUtils, so it can't.
private void encodeContentsFromZXingIntent(Intent intent) {
// Default to QR_CODE if no format given.
String formatString = intent.getStringExtra(Encode.FORMAT);
... | 3.26 |
zxing_QRCodeEncoder_encodeFromStreamExtra_rdh | // Handles send intents from the Contacts app, retrieving a contact as a VCARD.
private void encodeFromStreamExtra(Intent intent) throws WriterException {
format = BarcodeFormat.QR_CODE;
Bundle bundle = intent.getExtras();
if (bundle == null) {
throw new WriterException("No extras");
}
Uri uri =
bundle.getParcelab... | 3.26 |
zxing_ErrorCorrection_encodeECC200_rdh | /**
* Creates the ECC200 error correction for an encoded message.
*
* @param codewords
* the codewords
* @param symbolInfo
* information about the symbol to be encoded
* @return the codewords with interleaved error correction.
*/
public static String encodeECC200(String codewords, SymbolInfo symbolInfo) {
... | 3.26 |
zxing_OneDimensionalCodeWriter_encode_rdh | /**
* Encode the contents following specified format.
* {@code width} and {@code height} are required size. This method may return bigger size
* {@code BitMatrix} when specified size is too small. The user can set both {@code width} and
* {@code height} to zero to get minimum size barcode. If negative value is set ... | 3.26 |
zxing_OneDimensionalCodeWriter_renderResult_rdh | /**
*
* @return a byte array of horizontal pixels (0 = white, 1 = black)
*/
private static BitMatrix renderResult(boolean[] code, int width, int height, int sidesMargin) {
int inputWidth = code.length;
// Add quiet zone on both sides.
int fullWidth = inputWidth + sidesMargin;
int outputWidth = Math.m... | 3.26 |
zxing_OneDimensionalCodeWriter_checkNumeric_rdh | /**
*
* @param contents
* string to check for numeric characters
* @throws IllegalArgumentException
* if input contains characters other than digits 0-9.
*/protected static void checkNumeric(String contents) {
if (!NUMERIC.matcher(contents).matches()) {
throw new IllegalArgumentException("Input sh... | 3.26 |
zxing_Code128Writer_encode_rdh | /**
* Encode the string starting at position position starting with the character set charset
*/
private int encode(CharSequence contents, Charset charset, int position) {
assert position < contents.length();
int mCost = memoizedCost[charset.ordinal()][position... | 3.26 |
zxing_AztecWriter_encode_rdh | /**
* Renders an Aztec code as a {@link BitMatrix}.
*/public final class AztecWriter implements Writer {@Override
public BitMatrix
encode(String contents, BarcodeFormat format, int width, int height) {
return encode(contents, format, width, height, null);
} | 3.26 |
zxing_DecoderResult_getOther_rdh | /**
*
* @return arbitrary additional metadata
*/
public Object getOther() {
return other;
} | 3.26 |
zxing_DecoderResult_m1_rdh | /**
*
* @return text representation of the result
*/
public String m1() {
return text;
} | 3.26 |
zxing_DecoderResult_getRawBytes_rdh | /**
*
* @return raw bytes representing the result, or {@code null} if not applicable
*/
public byte[] getRawBytes() {
return rawBytes;
} | 3.26 |
zxing_DecoderResult_m0_rdh | /**
*
* @return how many bits of {@link #getRawBytes()} are valid; typically 8 times its length
* @since 3.3.0
*/
public int m0() {
return numBits;
} | 3.26 |
zxing_DecoderResult_getECLevel_rdh | /**
*
* @return name of error correction level used, or {@code null} if not applicable
*/
public String getECLevel() {
return ecLevel;
}
/**
*
* @return number of errors corrected, or {@code null} | 3.26 |
zxing_DecoderResult_getErasures_rdh | /**
*
* @return number of erasures corrected, or {@code null} if not applicable
*/
public Integer getErasures() {
return erasures;
} | 3.26 |
zxing_DecoderResult_getByteSegments_rdh | /**
*
* @return list of byte segments in the result, or {@code null} if not applicable
*/
public List<byte[]> getByteSegments() {
return byteSegments;
} | 3.26 |
zxing_DecoderResult_setNumBits_rdh | /**
*
* @param numBits
* overrides the number of bits that are valid in {@link #getRawBytes()}
* @since 3.3.0
*/
public void setNumBits(int numBits) {
this.numBits = numBits;
} | 3.26 |
zxing_Detector_getFirstDifferent_rdh | /**
* Gets the coordinate of the first point with a different color in the given direction
*/
private Point getFirstDifferent(Point init, boolean color, int dx, int dy) {
int x = init.getX() +
dx;
int y = init.getY() + dy;
while (isValid(x, y) && (image.get(x, y) == color)) {
x += dx;
... | 3.26 |
zxing_Detector_getCorrectedParameterData_rdh | /**
* Corrects the parameter bits using Reed-Solomon algorithm.
*
* @param parameterData
* parameter bits
* @param compact
* true if this is a compact Aztec code
* @return the corrected parameter
* @throws NotFoundException
* if the array contains too many errors
*/
private static CorrectedParameter get... | 3.26 |
zxing_Detector_getBullsEyeCorners_rdh | /**
* Finds the corners of a bull-eye centered on the passed point.
* This returns the centers of the diagonal points just outside the bull's eye
* Returns [topRight, bottomRight, bottomLeft, topLeft]
*
* @param pCenter
* Center point
* @return The corners of the bull-eye
* @throws NotFoundException
* If n... | 3.26 |
zxing_Detector_extractParameters_rdh | /**
* Extracts the number of data layers and data blocks from the layer around the bull's eye.
*
* @param bullsEyeCorners
* the array of bull's eye corners
* @return the number of errors corrected during parameter extraction
* @throws NotFoundException
* in case of too many errors or invalid parameters
*/
p... | 3.26 |
zxing_Detector_detect_rdh | /**
* Detects an Aztec Code in an image.
*
* @param isMirror
* if true, image is a mirror-image of original
* @return {@link AztecDetectorResult} encapsulating results of detecting an Aztec Code
* @throws NotFoundException
* if no Aztec Code can be found
*/
public AztecDetectorResult detect(boolean isMirr... | 3.26 |
zxing_Detector_getMatrixCornerPoints_rdh | /**
* Gets the Aztec code corners from the bull's eye corners and the parameters.
*
* @param bullsEyeCorners
* the array of bull's eye corners
* @return the array of aztec code corners
*/
private ResultPoint[] getMatrixCornerPoints(ResultPoint[] bullsEyeCorners) {return expandSquare(bullsEyeCorners, 2 * nbCent... | 3.26 |
zxing_Detector_sampleLine_rdh | /**
* Samples a line.
*
* @param p1
* start point (inclusive)
* @param p2
* end point (exclusive)
* @param size
* number of bits
* @return the array of bits as an int (first bit is high-order bit of result)
*/
private int sampleLine(ResultPoint p1, ResultPoint p2, int size) {
int result = 0;
fl... | 3.26 |
zxing_Detector_getMatrixCenter_rdh | /**
* Finds a candidate center point of an Aztec code from an image
*
* @return the center point
*/
private Point getMatrixCenter() {
ResultPoint pointA;
ResultPoint v41;
ResultPoint pointC;
ResultPoint pointD;
// Get a white rectangle that can be the border of the matrix in center bull's eye... | 3.26 |
zxing_Detector_expandSquare_rdh | /**
* Expand the square represented by the corner points by pushing out equally in all directions
*
* @param cornerPoints
* the corners of the square, which has the bull's eye at its center
* @param oldSide
* the original length of the side of the square in the target bit matrix
* @param newSide
* the new... | 3.26 |
zxing_Detector_getColor_rdh | /**
* Gets the color of a segment
*
* @return 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else
*/
private int getColor(Point p1, Point p2) {
float d = distance(p1, p2);
if (d == 0.0F... | 3.26 |
zxing_CalendarResultHandler_addCalendarEvent_rdh | /**
* Sends an intent to create a new calendar event by prepopulating the Add Event UI. Older
* versions of the system have a bug where the event title will not be filled out.
*
* @param summary
* A description of the event
* @param start
* The start time
* @param allDay
... | 3.26 |
zxing_PDF417ScanningDecoder_createDecoderResultFromAmbiguousValues_rdh | /**
* This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The
* current error correction implementation doesn't deal with erasures very well, so it's better to provide a value
* for these ambiguous codewords instead of treating it as an erasure. The problem is ... | 3.26 |
zxing_PDF417ScanningDecoder_correctErrors_rdh | /**
* <p>Given data and error-correction codewords received, possibly corrupted by errors, attempts to
* correct the errors in-place.</p>
*
* @param codewords
* data and error correction codewords
* @param erasures
* positions of any known erasures
* @param numECCodewords
* number of error correction cod... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.