Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e2e550cf2c9eb44fe0bcd4300676aed27b9ad227 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
 * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Eike Stepper - initial API and implementation
 */
package org.eclipse.emf.cdo.common.lob;

import org.eclipse.net4j.util.io.ExtendedDataInput;
import org.eclipse.net4j.util.io.ExtendedDataOutput;

import java.io.IOException;

/**
 * @author Eike Stepper
 * @since 4.0
 */
public final class CDOLobUtil
{
  private CDOLobUtil()
  {
  }

  public static CDOBlob readBlob(ExtendedDataInput in) throws IOException
  {
    return new CDOBlob(in);
  }

  public static CDOClob readClob(ExtendedDataInput in) throws IOException
  {
    return new CDOClob(in);
  }

  public static void write(ExtendedDataOutput out, CDOLob<?> lob) throws IOException
  {
    lob.write(out);
  }

  public static CDOBlob createBlob(byte[] id, long size)
  {
    return new CDOBlob(id, size);
  }

  public static CDOClob createClob(byte[] id, long size)
  {
    return new CDOClob(id, size);
  }

  public static void setStore(CDOLobStore store, CDOLob<?> lob) throws IOException
  {
    lob.setStore(store);
  }
}

Back to the top