/** * Retrieve the scheduled Job's byte blob from the journal. * * @param location * The location of the KahaAddScheduledJobCommand that originated the Job. * * @return a ByteSequence containing the payload of the scheduled Job. * * @throws IOException if an error occurs while reading the payload value. */ protected ByteSequence getPayload(Location location) throws IOException { KahaAddScheduledJobCommand job = (KahaAddScheduledJobCommand) this.load(location); Buffer payload = job.getPayload(); return new ByteSequence(payload.getData(), payload.getOffset(), payload.getLength()); }
static public String decode(Buffer buffer) { try { return new String(buffer.getData(), buffer.getOffset(), buffer.getLength(), "UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("A UnsupportedEncodingException was thrown for teh UTF-8 encoding. (This should never happen)"); } }
static public String decode(Buffer buffer) { try { return new String(buffer.getData(), buffer.getOffset(), buffer.getLength(), "UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("A UnsupportedEncodingException was thrown for teh UTF-8 encoding. (This should never happen)"); } }
static public String decode(Buffer buffer) { try { return new String(buffer.getData(), buffer.getOffset(), buffer.getLength(), "UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("A UnsupportedEncodingException was thrown for teh UTF-8 encoding. (This should never happen)"); } }
public BufferInputStream(Buffer sequence) { this(sequence.getData(), sequence.getOffset(), sequence.getLength()); }
public BufferInputStream(Buffer sequence) { this(sequence.getData(), sequence.getOffset(), sequence.getLength()); }
public BufferInputStream(Buffer sequence) { this(sequence.getData(), sequence.getOffset(), sequence.getLength()); }
/** * Retrieve the scheduled Job's byte blob from the journal. * * @param location * The location of the KahaAddScheduledJobCommand that originated the Job. * * @return a ByteSequence containing the payload of the scheduled Job. * * @throws IOException if an error occurs while reading the payload value. */ protected ByteSequence getPayload(Location location) throws IOException { KahaAddScheduledJobCommand job = (KahaAddScheduledJobCommand) this.load(location); Buffer payload = job.getPayload(); return new ByteSequence(payload.getData(), payload.getOffset(), payload.getLength()); }
/** * Retrieve the scheduled Job's byte blob from the journal. * * @param location * The location of the KahaAddScheduledJobCommand that originated the Job. * * @return a ByteSequence containing the payload of the scheduled Job. * * @throws IOException if an error occurs while reading the payload value. */ protected ByteSequence getPayload(Location location) throws IOException { KahaAddScheduledJobCommand job = (KahaAddScheduledJobCommand) this.load(location); Buffer payload = job.getPayload(); return new ByteSequence(payload.getData(), payload.getOffset(), payload.getLength()); }
/** * Retrieve the scheduled Job's byte blob from the journal. * * @param location * The location of the KahaAddScheduledJobCommand that originated the Job. * * @return a ByteSequence containing the payload of the scheduled Job. * * @throws IOException if an error occurs while reading the payload value. */ protected ByteSequence getPayload(Location location) throws IOException { KahaAddScheduledJobCommand job = (KahaAddScheduledJobCommand) this.load(location); Buffer payload = job.getPayload(); return new ByteSequence(payload.getData(), payload.getOffset(), payload.getLength()); }