@Override protected void unpackFrameData(byte[] bytes) throws InvalidDataException { String filetype; try { filetype = BufferTools.byteBufferToString(bytes, 1, 3); } catch (UnsupportedEncodingException e) { filetype = "unknown"; } mimeType = "image/" + filetype.toLowerCase(); pictureType = bytes[4]; int marker = BufferTools.indexOfTerminatorForEncoding(bytes, 5, bytes[0]); if (marker >= 0) { description = new EncodedText(bytes[0], BufferTools.copyBuffer(bytes, 5, marker - 5)); marker += description.getTerminator().length; } else { description = new EncodedText(bytes[0], ""); marker = 1; } imageData = BufferTools.copyBuffer(bytes, marker, bytes.length - marker); } }
@Override protected void unpackFrameData(byte[] bytes) throws InvalidDataException { int marker = BufferTools.indexOfTerminatorForEncoding(bytes, 1, bytes[0]); if (marker >= 0) { description = new EncodedText(bytes[0], BufferTools.copyBuffer(bytes, 1, marker - 1)); marker += description.getTerminator().length; } else { description = new EncodedText(bytes[0], ""); marker = 1; } try { url = BufferTools.byteBufferToString(bytes, marker, bytes.length - marker); } catch (UnsupportedEncodingException e) { url = ""; } }
@Override protected void unpackFrameData(byte[] bytes) throws InvalidDataException { try { language = BufferTools.byteBufferToString(bytes, 1, 3); } catch (UnsupportedEncodingException e) { language = ""; } int marker = BufferTools.indexOfTerminatorForEncoding(bytes, 4, bytes[0]); if (marker >= 4) { description = new EncodedText(bytes[0], BufferTools.copyBuffer(bytes, 4, marker - 4)); marker += description.getTerminator().length; } else { description = new EncodedText(bytes[0], ""); marker = 4; } comment = new EncodedText(bytes[0], BufferTools.copyBuffer(bytes, marker, bytes.length - marker)); }
@Override protected void unpackFrameData(byte[] bytes) throws InvalidDataException { int marker = BufferTools.indexOfTerminator(bytes, 1, 1); if (marker >= 0) { try { mimeType = BufferTools.byteBufferToString(bytes, 1, marker - 1); } catch (UnsupportedEncodingException e) { mimeType = "image/unknown"; } } else { mimeType = "image/unknown"; } pictureType = bytes[marker + 1]; marker += 2; int marker2 = BufferTools.indexOfTerminatorForEncoding(bytes, marker, bytes[0]); if (marker2 >= 0) { description = new EncodedText(bytes[0], BufferTools.copyBuffer(bytes, marker, marker2 - marker)); marker2 += description.getTerminator().length; } else { description = new EncodedText(bytes[0], ""); marker2 = marker; } imageData = BufferTools.copyBuffer(bytes, marker2, bytes.length - marker2); }
@Override protected void unpackFrameData(byte[] bytes) throws InvalidDataException { String filetype; try { filetype = BufferTools.byteBufferToString(bytes, 1, 3); } catch (UnsupportedEncodingException e) { filetype = "unknown"; } mimeType = "image/" + filetype.toLowerCase(); pictureType = bytes[4]; int marker = BufferTools.indexOfTerminatorForEncoding(bytes, 5, bytes[0]); if (marker >= 0) { description = new EncodedText(bytes[0], BufferTools.copyBuffer(bytes, 5, marker - 5)); marker += description.getTerminator().length; } else { description = new EncodedText(bytes[0], ""); marker = 1; } imageData = BufferTools.copyBuffer(bytes, marker, bytes.length - marker); } }
@Override protected void unpackFrameData(byte[] bytes) throws InvalidDataException { int marker = BufferTools.indexOfTerminatorForEncoding(bytes, 1, bytes[0]); if (marker >= 0) { description = new EncodedText(bytes[0], BufferTools.copyBuffer(bytes, 1, marker - 1)); marker += description.getTerminator().length; } else { description = new EncodedText(bytes[0], ""); marker = 1; } try { url = BufferTools.byteBufferToString(bytes, marker, bytes.length - marker); } catch (UnsupportedEncodingException e) { url = ""; } }
@Override protected void unpackFrameData(byte[] bytes) throws InvalidDataException { try { language = BufferTools.byteBufferToString(bytes, 1, 3); } catch (UnsupportedEncodingException e) { language = ""; } int marker = BufferTools.indexOfTerminatorForEncoding(bytes, 4, bytes[0]); if (marker >= 4) { description = new EncodedText(bytes[0], BufferTools.copyBuffer(bytes, 4, marker - 4)); marker += description.getTerminator().length; } else { description = new EncodedText(bytes[0], ""); marker = 4; } comment = new EncodedText(bytes[0], BufferTools.copyBuffer(bytes, marker, bytes.length - marker)); }
@Override protected void unpackFrameData(byte[] bytes) throws InvalidDataException { int marker = BufferTools.indexOfTerminator(bytes, 1, 1); if (marker >= 0) { try { mimeType = BufferTools.byteBufferToString(bytes, 1, marker - 1); } catch (UnsupportedEncodingException e) { mimeType = "image/unknown"; } } else { mimeType = "image/unknown"; } pictureType = bytes[marker + 1]; marker += 2; int marker2 = BufferTools.indexOfTerminatorForEncoding(bytes, marker, bytes[0]); if (marker2 >= 0) { description = new EncodedText(bytes[0], BufferTools.copyBuffer(bytes, marker, marker2 - marker)); marker2 += description.getTerminator().length; } else { description = new EncodedText(bytes[0], ""); marker2 = marker; } imageData = BufferTools.copyBuffer(bytes, marker2, bytes.length - marker2); }