1
2
3
4
5 package oshi.hardware.common;
6
7 import java.util.Arrays;
8
9 import oshi.annotation.concurrent.Immutable;
10 import oshi.hardware.Display;
11 import oshi.util.EdidUtil;
12
13
14
15
16 @Immutable
17 public abstract class AbstractDisplay implements Display {
18
19 private final byte[] edid;
20
21
22
23
24
25
26 protected AbstractDisplay(byte[] edid) {
27 this.edid = Arrays.copyOf(edid, edid.length);
28 }
29
30 @Override
31 public byte[] getEdid() {
32 return Arrays.copyOf(this.edid, this.edid.length);
33 }
34
35 @Override
36 public String toString() {
37 return EdidUtil.toString(this.edid);
38 }
39 }