APIdia Launch Partner
Top Description Inners Fields Constructors Methods
io.github.spannm.jackcess.impl.complex

public final Class AttachmentColumnInfoImpl

extends ComplexColumnInfoImpl<Attachment>
implements AttachmentColumnInfo
Class Inheritance
All Implemented Interfaces
io.github.spannm.jackcess.complex.AttachmentColumnInfo, io.github.spannm.jackcess.complex.ComplexColumnInfo
Imports
io.github.spannm.jackcess.Column, .DateTimeType, .Row, .Table, io.github.spannm.jackcess.complex.Attachment, .AttachmentColumnInfo, .ComplexDataType, .ComplexValue, .ComplexValueForeignKey, io.github.spannm.jackcess.impl.ByteUtil, .ColumnImpl, .JetFormat, .PageChannel, io.github.spannm.jackcess.util.ToStringBuilder, java.io.ByteArrayInputStream, .DataInputStream, .IOException, .InputStream, .OutputStream, java.nio.ByteBuffer, java.time.LocalDateTime, java.util.Arrays, .Collections, .Date, .HashSet, .Locale, .Set, java.util.zip.Deflater, .DeflaterOutputStream, .InflaterInputStream

Complex column info for a column holding 0 or more attachments per row.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final Set<String>
COMPRESSED_FORMATS

the file formats which Access stores raw.

private static final int
CONTENT_HEADER_FLAG

the second int of the content header.

private static final int
private static final int
private static final int
private static final String
private static final String
private final Column
private final Column
private final Column
private final Column
private final Column
private final Column
private static final int
Inherited from io.github.spannm.jackcess.impl.complex.ComplexColumnInfoImpl:
INVALID_FKINVALID_ID

Constructor Summary

AccessConstructor and Description
public
AttachmentColumnInfoImpl(Column column, int complexId, Table typeObjTable, Table flatTable)

Method Summary

Modifier and TypeMethod and Description
protected Object[]
public Column
public Column
public Column
public Column
public Column
public Column
public ComplexDataType
public static Attachment
newAttachment(byte[] data)

public static Attachment
newAttachment(ComplexValueForeignKey complexValueFk, byte[] data)

public static Attachment
newAttachment(String url, String name, String type, byte[] data, Object timeStamp, Integer flags)

public static Attachment
newAttachment(ComplexValueForeignKey complexValueFk, String url, String name, String type, byte[] data, Object timeStamp, Integer flags)

public static Attachment
newEncodedAttachment(byte[] encodedData)

public static Attachment
newEncodedAttachment(ComplexValueForeignKey complexValueFk, byte[] encodedData)

public static Attachment
newEncodedAttachment(String url, String name, String type, byte[] encodedData, Object timeStamp, Integer flags)

public static Attachment
newEncodedAttachment(ComplexValueForeignKey complexValueFk, String url, String name, String type, byte[] encodedData, Object timeStamp, Integer flags)

protected AttachmentColumnInfoImpl.AttachmentImpl
Inherited from io.github.spannm.jackcess.impl.complex.ComplexColumnInfoImpl:
addRawValueaddValueaddValuescountValuesdeleteAllValuesdeleteAllValuesdeleteRawValuedeleteValuedeleteValuesdiffFlatColumnsgetColumngetComplexValueForeignKeyColumngetDatabasegetPrimaryKeyColumngetRawValuesgetRawValuesgetTypeColumnsgetValueIdgetValueIdgetValuespostTableLoadInittoStringtoValuesupdateRawValueupdateValueupdateValues

Field Detail

COMPRESSED_FORMATSback to summary
private static final Set<String> COMPRESSED_FORMATS

the file formats which Access stores raw. It deflates everything else, including formats which are compressed already, such as gz and mp3

CONTENT_HEADER_FLAGback to summary
private static final int CONTENT_HEADER_FLAG

the second int of the content header. Access always writes a 1

CONTENT_HEADER_SIZEback to summary
private static final int CONTENT_HEADER_SIZE
DATA_TYPE_COMPRESSEDback to summary
private static final int DATA_TYPE_COMPRESSED
DATA_TYPE_RAWback to summary
private static final int DATA_TYPE_RAW
FILE_NAME_COL_NAMEback to summary
private static final String FILE_NAME_COL_NAME
FILE_TYPE_COL_NAMEback to summary
private static final String FILE_TYPE_COL_NAME
fileDataColback to summary
private final Column fileDataCol
fileFlagsColback to summary
private final Column fileFlagsCol
fileNameColback to summary
private final Column fileNameCol
fileTimeStampColback to summary
private final Column fileTimeStampCol
fileTypeColback to summary
private final Column fileTypeCol
fileUrlColback to summary
private final Column fileUrlCol
WRAPPER_HEADER_SIZEback to summary
private static final int WRAPPER_HEADER_SIZE

Constructor Detail

AttachmentColumnInfoImplback to summary
public AttachmentColumnInfoImpl(Column column, int complexId, Table typeObjTable, Table flatTable) throws IOException

Method Detail

asRowback to summary
protected Object[] asRow(Object[] row, Attachment attachment) throws IOException

Overrides io.github.spannm.jackcess.impl.complex.ComplexColumnInfoImpl.asRow.

Annotations
@Override
getFileDataColumnback to summary
public Column getFileDataColumn()
getFileFlagsColumnback to summary
public Column getFileFlagsColumn()
getFileNameColumnback to summary
public Column getFileNameColumn()
getFileTimeStampColumnback to summary
public Column getFileTimeStampColumn()
getFileTypeColumnback to summary
public Column getFileTypeColumn()
getFileUrlColumnback to summary
public Column getFileUrlColumn()
getTypeback to summary
public ComplexDataType getType()

Implements abstract io.github.spannm.jackcess.impl.complex.ComplexColumnInfoImpl.getType.

Implements io.github.spannm.jackcess.complex.ComplexColumnInfo.getType.

Annotations
@Override
newAttachmentback to summary
public static Attachment newAttachment(byte[] data)
newAttachmentback to summary
public static Attachment newAttachment(ComplexValueForeignKey complexValueFk, byte[] data)
newAttachmentback to summary
public static Attachment newAttachment(String url, String name, String type, byte[] data, Object timeStamp, Integer flags)
newAttachmentback to summary
public static Attachment newAttachment(ComplexValueForeignKey complexValueFk, String url, String name, String type, byte[] data, Object timeStamp, Integer flags)
newEncodedAttachmentback to summary
public static Attachment newEncodedAttachment(byte[] encodedData)
newEncodedAttachmentback to summary
public static Attachment newEncodedAttachment(ComplexValueForeignKey complexValueFk, byte[] encodedData)
newEncodedAttachmentback to summary
public static Attachment newEncodedAttachment(String url, String name, String type, byte[] encodedData, Object timeStamp, Integer flags)
newEncodedAttachmentback to summary
public static Attachment newEncodedAttachment(ComplexValueForeignKey complexValueFk, String url, String name, String type, byte[] encodedData, Object timeStamp, Integer flags)
toValueback to summary
protected AttachmentColumnInfoImpl.AttachmentImpl toValue(ComplexValueForeignKey complexValueFk, Row rawValue)

Implements abstract io.github.spannm.jackcess.impl.complex.ComplexColumnInfoImpl.toValue.

Annotations
@Override
io.github.spannm.jackcess.impl.complex back to summary

private final Class AttachmentColumnInfoImpl.AttachmentImpl

extends ComplexValueImpl
implements Attachment
Class Inheritance
All Implemented Interfaces
io.github.spannm.jackcess.complex.Attachment, io.github.spannm.jackcess.complex.ComplexValue

Field Summary

Modifier and TypeField and Description
private byte[]
private byte[]
private Integer
private String
private Object
private String
private String

Constructor Summary

AccessConstructor and Description
private
AttachmentImpl(ComplexValue.Id id, ComplexValueForeignKey complexValueFk, String url, String name, String type, byte[] data, Object timeStamp, Integer flags, byte[] encodedData)

Method Summary

Modifier and TypeMethod and Description
private byte[]
decodeData()

Decodes the raw attachment file data to get the _actual_ content.

public void
delete()

Implements io.github.spannm.jackcess.complex.ComplexValue.delete.

Deletes the data for this complex value from the database.

private byte[]
encodeData()

Encodes the actual attachment file data to get the raw, stored format.

public byte[]
public byte[]
public Integer
public LocalDateTime
public String
public Date
public Object
public String
public String
public void
public void
public void
public void
public void
public void
public void
public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
update()

Implements io.github.spannm.jackcess.complex.ComplexValue.update.

Writes any updated data for this complex value to the database.

Inherited from io.github.spannm.jackcess.impl.complex.ComplexColumnInfoImpl.ComplexValueImpl:
equalsgetColumngetComplexValueForeignKeygetIdhashCodesetComplexValueForeignKeysetId

Field Detail

databack to summary
private byte[] data
encodedDataback to summary
private byte[] encodedData
flagsback to summary
private Integer flags
nameback to summary
private String name
timeStampback to summary
private Object timeStamp
typeback to summary
private String type
urlback to summary
private String url

Constructor Detail

AttachmentImplback to summary
private AttachmentImpl(ComplexValue.Id id, ComplexValueForeignKey complexValueFk, String url, String name, String type, byte[] data, Object timeStamp, Integer flags, byte[] encodedData)

Method Detail

decodeDataback to summary
private byte[] decodeData() throws IOException

Decodes the raw attachment file data to get the _actual_ content.

Annotations
@SuppressWarnings:PMD.UseTryWithResources
deleteback to summary
public void delete() throws IOException

Implements io.github.spannm.jackcess.complex.ComplexValue.delete.

Doc from io.github.spannm.jackcess.complex.ComplexValue.delete.

Deletes the data for this complex value from the database.

Annotations
@Override
encodeDataback to summary
private byte[] encodeData() throws IOException

Encodes the actual attachment file data to get the raw, stored format.

Annotations
@SuppressWarnings:PMD.UseTryWithResources
getEncodedFileDataback to summary
public byte[] getEncodedFileData() throws IOException

Implements io.github.spannm.jackcess.complex.Attachment.getEncodedFileData.

Annotations
@Override
getFileDataback to summary
public byte[] getFileData() throws IOException

Implements io.github.spannm.jackcess.complex.Attachment.getFileData.

Annotations
@Override
getFileFlagsback to summary
public Integer getFileFlags()

Implements io.github.spannm.jackcess.complex.Attachment.getFileFlags.

Annotations
@Override
getFileLocalTimeStampback to summary
public LocalDateTime getFileLocalTimeStamp()

Implements io.github.spannm.jackcess.complex.Attachment.getFileLocalTimeStamp.

Annotations
@Override
getFileNameback to summary
public String getFileName()

Implements io.github.spannm.jackcess.complex.Attachment.getFileName.

Annotations
@Override
getFileTimeStampback to summary
public Date getFileTimeStamp()

Implements io.github.spannm.jackcess.complex.Attachment.getFileTimeStamp.

Deprecated

see DateTimeType for details

Annotations
@Override
@Deprecated
getFileTimeStampObjectback to summary
public Object getFileTimeStampObject()

Implements io.github.spannm.jackcess.complex.Attachment.getFileTimeStampObject.

Annotations
@Override
getFileTypeback to summary
public String getFileType()

Implements io.github.spannm.jackcess.complex.Attachment.getFileType.

Annotations
@Override
getFileUrlback to summary
public String getFileUrl()

Implements io.github.spannm.jackcess.complex.Attachment.getFileUrl.

Annotations
@Override
setEncodedFileDataback to summary
public void setEncodedFileData(byte[] newEncodedData)

Implements io.github.spannm.jackcess.complex.Attachment.setEncodedFileData.

Annotations
@Override
setFileDataback to summary
public void setFileData(byte[] newData)

Implements io.github.spannm.jackcess.complex.Attachment.setFileData.

Annotations
@Override
setFileFlagsback to summary
public void setFileFlags(Integer fileFlags)

Implements io.github.spannm.jackcess.complex.Attachment.setFileFlags.

Annotations
@Override
setFileLocalTimeStampback to summary
public void setFileLocalTimeStamp(LocalDateTime fileTimeStamp)

Implements io.github.spannm.jackcess.complex.Attachment.setFileLocalTimeStamp.

Annotations
@Override
setFileNameback to summary
public void setFileName(String fileName)

Implements io.github.spannm.jackcess.complex.Attachment.setFileName.

Annotations
@Override
setFileTimeStampback to summary
public void setFileTimeStamp(Date fileTimeStamp)

Implements io.github.spannm.jackcess.complex.Attachment.setFileTimeStamp.

Deprecated

see DateTimeType for details

Annotations
@Override
@Deprecated
setFileTypeback to summary
public void setFileType(String fileType)

Implements io.github.spannm.jackcess.complex.Attachment.setFileType.

Annotations
@Override
setFileUrlback to summary
public void setFileUrl(String fileUrl)

Implements io.github.spannm.jackcess.complex.Attachment.setFileUrl.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
updateback to summary
public void update() throws IOException

Implements io.github.spannm.jackcess.complex.ComplexValue.update.

Doc from io.github.spannm.jackcess.complex.ComplexValue.update.

Writes any updated data for this complex value to the database.

Annotations
@Override