| 1 |
/* |
| 2 |
* Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0, |
| 3 |
* and the EPL 1.0 (https://h2database.com/html/license.html). |
| 4 |
* Initial Developer: H2 Group |
| 5 |
*/ |
| 6 |
package org.h2.value.lob; |
| 7 |
|
| 8 |
import java.io.InputStream; |
| 9 |
|
| 10 |
import org.h2.store.DataHandler; |
| 11 |
import org.h2.value.ValueLob; |
| 12 |
|
| 13 |
/** |
| 14 |
* LOB data. |
| 15 |
*/ |
| 16 |
public abstract class LobData { |
| 17 |
|
| 18 |
LobData() { |
| 19 |
} |
| 20 |
|
| 21 |
/** |
| 22 |
* Get stream to read LOB data from |
| 23 |
* @param precision octet length of the stream, or -1 if unknown |
| 24 |
* @return stream to read LOB data from |
| 25 |
*/ |
| 26 |
public abstract InputStream getInputStream(long precision); |
| 27 |
|
| 28 |
public DataHandler getDataHandler() { |
| 29 |
return null; |
| 30 |
} |
| 31 |
|
| 32 |
public boolean isLinkedToTable() { |
| 33 |
return false; |
| 34 |
} |
| 35 |
|
| 36 |
/** |
| 37 |
* Remove the underlying resource, if any. For values that are kept fully in |
| 38 |
* memory this method has no effect. |
| 39 |
* @param value to remove |
| 40 |
*/ |
| 41 |
public void remove(ValueLob value) { |
| 42 |
} |
| 43 |
|
| 44 |
/** |
| 45 |
* Get the memory used by this object. |
| 46 |
* |
| 47 |
* @return the memory used in bytes |
| 48 |
*/ |
| 49 |
public int getMemory() { |
| 50 |
return 140; |
| 51 |
} |
| 52 |
|
| 53 |
} |