com.itextpdf.text.pdf.qrcode
Class ByteMatrix

java.lang.Object
  extended by com.itextpdf.text.pdf.qrcode.ByteMatrix

public final class ByteMatrix
extends Object

A class which wraps a 2D array of bytes. The default usage is signed. If you want to use it as a unsigned container, it's up to you to do byteValue & 0xff at each location. JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned -1, 0, and 1, I'm going to use less memory and go with bytes.

Since:
5.0.2
Author:
dswitkin@google.com (Daniel Switkin)

Constructor Summary
ByteMatrix(int width, int height)
           
 
Method Summary
 void clear(byte value)
           
 byte get(int x, int y)
           
 byte[][] getArray()
           
 int getHeight()
           
 int getWidth()
           
 void set(int x, int y, byte value)
           
 void set(int x, int y, int value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ByteMatrix

public ByteMatrix(int width,
                  int height)
Method Detail

getHeight

public int getHeight()

getWidth

public int getWidth()

get

public byte get(int x,
                int y)

getArray

public byte[][] getArray()

set

public void set(int x,
                int y,
                byte value)

set

public void set(int x,
                int y,
                int value)

clear

public void clear(byte value)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.