SerialClob

SerialClob (직렬화된 CLOB)

SQL CLOB 값을 Java 프로그래밍 언어로 매핑한 직렬화된 버전입니다.

출처: Java API Reference

본문

SerialClob 클래스는 Clob 객체에서 인스턴스를 만드는 생성자를 제공합니다. Clob 객체에서 SerialClob을 만들기 전에 그 Clob 객체가 SQL CLOB 값의 데이터를 클라이언트로 가져와 있어야 합니다. SQL CLOB 값의 데이터는 클라이언트에서 유니코드 문자 스트림으로 구체화할 수 있어요.

SerialClob 메서드는 SerialClob 객체에서 부분 문자열을 얻거나 문자 패턴의 시작 위치를 찾는 것을 가능하게 합니다.

SerialClob은 여러 동시 스레드가 사용하기에 안전하지 않습니다. 둘 이상의 스레드가 사용한다면 적절한 동기화로 접근을 제어해야 해요.

public SerialClob(Clob clob) throws SerialException, SQLException
public SerialClob(char[] ch) throws SerialException, SQLException
public long length() throws SerialException
public String getSubString(long pos, int length) throws SerialException
public Reader getCharacterStream() throws SerialException
public InputStream getAsciiStream() throws SerialException
public long position(String searchstr, long start) throws SerialException
public long position(Clob searchstr, long start) throws SerialException
public int setString(long pos, String str) throws SerialException
public int setString(long pos, String str, int offset, int len) throws SerialException
public void truncate(long len) throws SerialException

getSubString은 지정한 위치에서 주어진 길이만큼의 부분 문자열을 반환하고, position은 서브 문자열이나 Clob 패턴의 시작 위치를 찾습니다.

더 알아보기 (Learn more)

Java 공식 API