Package org.citydb.database.adapter
Class BlobExportAdapter
- java.lang.Object
-
- org.citydb.database.adapter.BlobExportAdapter
-
public class BlobExportAdapter extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BlobExportAdapter.BatchEntry
static interface
BlobExportAdapter.OutputStreamSupplier
-
Field Summary
Fields Modifier and Type Field Description protected java.sql.Connection
connection
-
Constructor Summary
Constructors Constructor Description BlobExportAdapter(java.sql.Connection connection, BlobType blobType, java.lang.String schema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
addBatch(long id, BlobExportAdapter.BatchEntry entry)
void
close()
int
executeBatch()
byte[]
getInByteArray(long id)
BlobExportAdapter
withBatchSize(int batchSize)
boolean
writeToFile(long id, java.lang.String fileName)
boolean
writeToStream(long id, java.io.OutputStream stream)
-
-
-
Constructor Detail
-
BlobExportAdapter
public BlobExportAdapter(java.sql.Connection connection, BlobType blobType, java.lang.String schema)
-
-
Method Detail
-
withBatchSize
public BlobExportAdapter withBatchSize(int batchSize)
-
addBatch
public int addBatch(long id, BlobExportAdapter.BatchEntry entry) throws java.io.IOException, java.sql.SQLException
- Throws:
java.io.IOException
java.sql.SQLException
-
executeBatch
public int executeBatch() throws java.sql.SQLException, java.io.IOException
- Throws:
java.sql.SQLException
java.io.IOException
-
getInByteArray
public byte[] getInByteArray(long id) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
writeToFile
public boolean writeToFile(long id, java.lang.String fileName) throws java.sql.SQLException, java.io.IOException
- Throws:
java.sql.SQLException
java.io.IOException
-
writeToStream
public boolean writeToStream(long id, java.io.OutputStream stream) throws java.sql.SQLException, java.io.IOException
- Throws:
java.sql.SQLException
java.io.IOException
-
close
public void close() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
-