1 package org.jscsi.target.scsi.cdb;
2
3
4
5
6
7
8
9
10
11 public enum DefectListFormat {
12 SHORT_BLOCK((byte) 0), LONG_BLOCK((byte) 3), BYTES_FROM_INDEX((byte) 4), PHYSICAL_SECTOR((byte) 5), VENDOR_SPECIFIC((byte) 6);
13
14
15 private final byte value;
16
17 private DefectListFormat (byte value) {
18 this.value = value;
19 }
20
21 public byte getValue () {
22 return value;
23 }
24
25 public static DefectListFormat valueOf (int value) {
26 DefectListFormat[] values = values();
27 for (int i = 0; i < values.length; ++i)
28 if (values[i].getValue() == value) return values[i];
29 return null;
30 }
31 }