41.4.2. unmarshalling

unmarshaller는 일반적인 것입니다. unmarshalling의 경우 BarcodeDataFormat 인스턴스를 사용할 수 있습니다. 두 개의 인스턴스가 있는 경우, QR-Code용이고 다른 하나는 PDF417용이므로 어떤 인스턴스가 사용될지 중요하지 않습니다.

from("file://barcode_in?noop=true")
  .unmarshal(code) // for unmarshalling, the instance doesn't matter
  .to("mock:out");

위의 QR-Code 이미지를 'barcode_in' 폴더에 붙여 넣으면, 이는 모크 내부에 testmessage! 임을 알 수 있습니다. 바코드 데이터 형식을 헤더 변수로 찾을 수 있습니다.

이름유형설명

BarcodeFormat

문자열

com.google.zxing.BarcodeFormat의 값입니다.