# BarcodeResultItem Class

The `BarcodeResultItem` class represents a barcode result item decoded by barcode reader engine. It is derived from `CapturedResultItem`.

## Definition

*Package:* com.dynamsoft.dbr

*Inheritance:* [CapturedResultItem](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/basic-classes/captured-result-item.md) -> BarcodeResultItem

```java
public class BarcodeResultItem extends CapturedResultItem
```

## Methods

| Method               | Description |
|----------------------|-------------|
| [`getFormat`](#getformat) | Gets the format of the decoded barcode result. |
| [`getFormatString`](#getformatstring) | Gets the format string of the decoded barcode result. |
| [`getText`](#gettext) | Gets the text result of the decoded barcode. |
| [`getBytes`](#getbytes) | Gets the text bytes of the decoded barcode result. |
| [`getLocation`](#getlocation) | Gets the location of the decoded barcode in a quadrilateral. |
| [`getConfidence`](#getconfidence) | Gets the confidence of the decoded barcode result. |
| [`getAngle`](#getangle) | Gets the angle of the decoded barcode result. |
| [`getModuleSize`](#getmodulesize) | Gets the module size of the decoded barcode result. |
| [`getDetails`](#getdetails) | Gets the details of the decoded barcode result. |
| [`isDPM`](#isdpm) | Gets whether the decoded barcode is a DPM code. |
| [`isMirrored`](#ismirrored) | Gets whether the decoded barcode is a mirrored barcode. |
| [`setLocation`](#setlocation) | Sets the location of the decoded barcode. |
| [`setText`](#settext) | Sets the text of the decoded barcode. |
| [`setBytes`](#setbytes) | Sets the bytes of the decoded barcode. |
| [`getECISegments`](#getecisegments) | Gets all the ECI segments in the barcode. |

## Method Details

### getFormat

Gets the format of the decoded barcode result.

```java
public @EnumBarcodeFormat long getFormat()
```

**Return Value**

Returns the format of the decoded barcode result which is a value of the `EnumBarcodeFormat` enumeration.

**See Also**

[EnumBarcodeFormat](https://www.dynamsoft.com/barcode-reader/docs/server/programming/java/api-reference/enum-barcode-format.md)

### getFormatString

Gets the format string of the decoded barcode result.

```java
public String getFormatString()
```

**Return Value**

Returns the format string of the decoded barcode result.

### getText

Gets the text result of the decoded barcode.

```java
public String getText()
```

**Return Value**

Returns the text result of the decoded barcode.

### getBytes

Gets the text bytes of the decoded barcode result.

```java
public byte[] getBytes()
```

**Return Value**

Returns the text bytes of the decoded barcode result.

### getLocation

Gets the location of the decoded barcode in a quadrilateral.

```java
public Quadrilateral getLocation()
```

**Return Value**

Returns the location of the decoded barcode in a quadrilateral.

**See Also**

[Quadrilateral](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/basic-classes/quadrilateral.md)

### getConfidence

Gets the confidence of the decoded barcode result.

```java
public int getConfidence()
```

**Return Value**

Returns the confidence of the decoded barcode result.

### getAngle

Gets the angle of the decoded barcode result.

```java
public int getAngle()
```

**Return Value**

Returns the angle of the decoded barcode result.

**See Also**

[How the angle is calculated for different barcode types](https://www.dynamsoft.com/barcode-reader/docs/core/programming/features/get-confidence-rotation.md#barcode-rotation-angle)

### getModuleSize

Gets the module size of the decoded barcode result.

```java
public int getModuleSize()
```

**Return Value**

Returns the module size of the decoded barcode result.

### getDetails

Gets the details of the decoded barcode result.

```java
public BarcodeDetails getDetails()
```

**Return Value**

Returns the details of the decoded barcode result.

**See Also**

- [AztecDetails](https://www.dynamsoft.com/barcode-reader/docs/server/programming/java/api-reference/aztec-details.md)
- [BarcodeDetails](https://www.dynamsoft.com/barcode-reader/docs/server/programming/java/api-reference/barcode-details.md)
- [DataMatrixDetails](https://www.dynamsoft.com/barcode-reader/docs/server/programming/java/api-reference/datamatrix-details.md)
- [OneDCodeDetails](https://www.dynamsoft.com/barcode-reader/docs/server/programming/java/api-reference/oned-code-details.md)
- [PDF417Details](https://www.dynamsoft.com/barcode-reader/docs/server/programming/java/api-reference/pdf417-details.md)
- [QRCodeDetails](https://www.dynamsoft.com/barcode-reader/docs/server/programming/java/api-reference/qr-code-details.md)

### isDPM

Gets whether the decoded barcode is a DPM code.

```java
public boolean isDPM()
```

**Return Value**

Returns whether the decoded barcode is a DPM code.

### isMirrored

Gets whether the decoded barcode is mirrored.

```java
public boolean isMirrored()
```

**Return Value**

Returns whether the decoded barcode is mirrored.

### setLocation

Sets the location of the decoded barcode.

```java
public void setLocation(Quadrilateral location) throws BarcodeReaderException
```

**Parameters**

`location`: The location of the decoded barcode in a quadrilateral.

**Exceptions**

`BarcodeReaderException`: Thrown when an error occurs during the operation.

**See Also**

[BarcodeReaderException](https://www.dynamsoft.com/barcode-reader/docs/server/programming/java/api-reference/barcode-reader-exception.md)

### setText

Sets the text of the decoded barcode.

```java
public void setText(String text)
```

**Parameters**

`text`: The text of the decoded barcode.

### setBytes

Sets the bytes of the decoded barcode.

```java
public void setBytes(byte[] bytes)
```

**Parameters**

`bytes`: The bytes of the decoded barcode.

### getECISegments

Gets all the ECI segments in the barcode.

```java
public ECISegment[] getECISegments()
```

**Return Value**

Returns an array of [`ECISegment`](https://www.dynamsoft.com/barcode-reader/docs/server/programming/java/api-reference/eci-segment.md) objects. Returns an empty array if no ECI information is present.

**See Also**

[ECISegment](https://www.dynamsoft.com/barcode-reader/docs/server/programming/java/api-reference/eci-segment.md)

**Remarks**

Introduced in Dynamsoft Barcode Reader SDK version 11.4.1000 and Dynamsoft Capture Vision version 3.4.1000.

