Package org.apache.jackrabbit.core.value

Examples of org.apache.jackrabbit.core.value.BLOBFileValue.discard()


                            } catch (Exception e) {
                                log.error("Error while reloading blob. truncating. id=" + state.getId() +
                                        " idx=" + i + " size=" + size, e);
                                values[i] = InternalValue.create(new byte[0]);
                            }
                            blobVal.discard();
                        }
                        // store id of blob as property value
                        out.writeUTF(blobId);   // value
                    } else {
                        // delete evt. blob
View Full Code Here


                        }
                        out.write(data, 0, data.length);
                        // replace value instance with value
                        // backed by resource in blob store and delete temp file
                        values[i] = InternalValue.create(data);
                        blobVal.discard();
                    }
                    break;
                case PropertyType.DOUBLE:
                    out.writeDouble(val.getDouble());
                    break;
View Full Code Here

                    if (size < 0) {
                        log.warn("Blob has negative size. Potential loss of data. " +
                            "id={} idx={}", state.getId(), String.valueOf(i));
                        out.writeInt(0);
                        values[i] = InternalValue.create(new byte[0]);
                        blobVal.discard();
                    } else if (size > minBlobSize) {
                        out.writeInt(-1);
                        String blobId = state.getBlobId(i);
                        if (blobId == null) {
                            try {
View Full Code Here

                            } catch (Exception e) {
                                log.error("Error while reloading blob. truncating. id=" + state.getId() +
                                        " idx=" + i + " size=" + size, e);
                                values[i] = InternalValue.create(new byte[0]);
                            }
                            blobVal.discard();
                        }
                        // store id of blob as property value
                        out.writeUTF(blobId);   // value
                    } else {
                        // delete evt. blob
View Full Code Here

                        }
                        out.write(data, 0, data.length);
                        // replace value instance with value
                        // backed by resource in blob store and delete temp file
                        values[i] = InternalValue.create(data);
                        blobVal.discard();
                    }
                    break;
                case PropertyType.DOUBLE:
                    out.writeDouble(val.getDouble());
                    break;
View Full Code Here

                                        } catch (IOException e) {
                                            // ignore
                                        }
                                    }
                                }
                                blobVal.discard();
                            } else {
                                writer.write(Text.encodeIllegalXMLCharacters(val.toString()));
                            }
                        }
                        writer.write("</" + VALUE_ELEMENT + ">\n");
View Full Code Here

                    if (size < 0) {
                        log.warn("Blob has negative size. Potential loss of data. " +
                            "id={} idx={}", state.getId(), String.valueOf(i));
                        out.writeInt(0);
                        values[i] = InternalValue.create(new byte[0]);
                        blobVal.discard();
                    } else if (size > minBlobSize) {
                        out.writeInt(-1);
                        String blobId = state.getBlobId(i);
                        if (blobId == null) {
                            try {
View Full Code Here

                            } catch (Exception e) {
                                log.error("Error while reloading blob. truncating. id=" + state.getId() +
                                        " idx=" + i + " size=" + size, e);
                                values[i] = InternalValue.create(new byte[0]);
                            }
                            blobVal.discard();
                        }
                        // store id of blob as property value
                        out.writeUTF(blobId);   // value
                    } else {
                        // delete evt. blob
View Full Code Here

                        }
                        out.write(data, 0, data.length);
                        // replace value instance with value
                        // backed by resource in blob store and delete temp file
                        values[i] = InternalValue.create(data);
                        blobVal.discard();
                    }
                    break;
                case PropertyType.DOUBLE:
                    out.writeDouble(val.getDouble());
                    break;
View Full Code Here

                    if (size < 0) {
                        log.warn("Blob has negative size. Potential loss of data. " +
                            "id={} idx={}", state.getId(), String.valueOf(i));
                        out.writeInt(0);
                        values[i] = InternalValue.create(new byte[0]);
                        blobVal.discard();
                    } else if (size > minBlobSize) {
                        out.writeInt(-1);
                        String blobId = state.getBlobId(i);
                        if (blobId == null) {
                            try {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.